Skip to content

Commit 256c116

Browse files
[Feat] - Add Sitemap Feature for the Docs (WasmEdge#170)
* Fixed formatting issues Signed-off-by: Adithya Krishna <[email protected]> * Added Sitemap Config Signed-off-by: Adithya Krishna <[email protected]> * Updated Sitemap Config Signed-off-by: Adithya Krishna <[email protected]> --------- Signed-off-by: Adithya Krishna <[email protected]>
1 parent 7552161 commit 256c116

File tree

7 files changed

+45
-37
lines changed

7 files changed

+45
-37
lines changed

docs/develop/rust/wasinn/mediapipe.md

+4-12
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ sidebar_position: 1
44

55
# Mediapipe solutions
66

7-
Mediapipe is a collection of highly popular AI models developed by Google. They focus on intelligent processing of media files
8-
and streams. The `mediapipe-rs` crate is a Rust library for data processing using the Mediapipe suite of models. The crate provides
9-
Rust APIs to pre-process the data in media files or streams, run AI model inference to analyze the data, and then post-process
10-
or manipulate the media data based on the AI output.
7+
Mediapipe is a collection of highly popular AI models developed by Google. They focus on intelligent processing of media files and streams. The `mediapipe-rs` crate is a Rust library for data processing using the Mediapipe suite of models. The crate provides Rust APIs to pre-process the data in media files or streams, run AI model inference to analyze the data, and then post-process or manipulate the media data based on the AI output.
118

129
## Prerequisite
1310

@@ -63,10 +60,7 @@ DetectionResult:
6360

6461
## Understand the code
6562

66-
The [main.rs](https://github.com/juntao/demo-object-detection/blob/main/src/main.rs) is the complete example Rust source.
67-
All `mediapipe-rs` APIs follow a common pattern. A Rust struct is designed to work with a model. It contains functions
68-
required to pre- and post-process data for the model. For example, we can create an `detector` instance
69-
using the builder pattern, which can build from any "object detection" model in the Mediapipe model library.
63+
The [main.rs](https://github.com/juntao/demo-object-detection/blob/main/src/main.rs) is the complete example Rust source. All `mediapipe-rs` APIs follow a common pattern. A Rust struct is designed to work with a model. It contains functions required to pre- and post-process data for the model. For example, we can create an `detector` instance using the builder pattern, which can build from any "object detection" model in the Mediapipe model library.
7064

7165
```rust
7266
let model_data: &[u8] = include_bytes!("mobilenetv2_ssd_256_uint8.tflite");
@@ -75,17 +69,15 @@ let detector = ObjectDetectorBuilder::new()
7569
.build_from_buffer(model_data)?;
7670
```
7771

78-
The `detect()` function takes in an image, pre-processes it into a tensor array, runs inference on the mediapipe object detection model,
79-
and the post-processes the returned tensor array into a human redable format stored in the `detection_result`.
72+
The `detect()` function takes in an image, pre-processes it into a tensor array, runs inference on the mediapipe object detection model, and the post-processes the returned tensor array into a human redable format stored in the `detection_result`.
8073

8174
```rust
8275
let mut input_img = image::open(img_path)?;
8376
let detection_result = detector.detect(&input_img)?;
8477
println!("{}", detection_result);
8578
```
8679

87-
Furthermore, the `mediapipe-rs` crate provides additional utility functions to post-process the data. For example,
88-
the `draw_detection()` utility function draws the data in `detection_result` onto the input image.
80+
Furthermore, the `mediapipe-rs` crate provides additional utility functions to post-process the data. For example, the `draw_detection()` utility function draws the data in `detection_result` onto the input image.
8981

9082
```rust
9183
draw_detection(&mut input_img, &detection_result);

docs/start/usage/use-cases.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Featuring AOT compiler optimization, WasmEdge is one of the fastest WebAssembly
2020

2121
- WasmEdge applications can be plugged into existing application frameworks or platforms.
2222

23-
If you have any great ideas on WasmEdge, don't hesitate to open a GitHub issue to discuss together.
23+
If you have any great ideas on WasmEdge, don't hesitate to open a GitHub issue to discuss together.

docusaurus.config.js

+32-11
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ const config = {
6464
theme: {
6565
customCss: require.resolve('./src/css/custom.css'),
6666
},
67+
sitemap: {
68+
changefreq: 'weekly',
69+
priority: 0.5,
70+
ignorePatterns: ['/tags/**'],
71+
filename: 'sitemap.xml',
72+
},
6773
}),
6874
],
6975
],
@@ -172,13 +178,16 @@ const config = {
172178
{
173179
label: 'Getting Started',
174180
to: '/start/overview',
175-
}, {
181+
},
182+
{
176183
label: 'Develop',
177184
to: '/develop/overview',
178-
}, {
185+
},
186+
{
179187
label: 'Embeds',
180188
to: '/embed/overview',
181-
}, {
189+
},
190+
{
182191
label: 'Contribute',
183192
to: '/contribute/overview',
184193
}
@@ -189,18 +198,26 @@ const config = {
189198
{
190199
label: 'Github',
191200
href: 'https://github.com/WasmEdge/WasmEdge',
192-
}, {
201+
},
202+
{
193203
label: 'Second State',
194204
href: 'https://www.secondstate.io/',
195-
}, {
205+
},
206+
{
196207
label: 'Articles & Blog',
197208
href: 'https://www.secondstate.io/articles/'
198-
}, {
209+
},
210+
{
199211
label: 'WasmEdge Talks',
200212
to: '/talks'
201-
}, {
213+
},
214+
{
202215
label: 'Releases',
203216
to: '/releases'
217+
},
218+
{
219+
label: 'Sitemap',
220+
href: 'https://wasmedge.org/docs/sitemap.xml'
204221
}
205222
],
206223
},
@@ -210,16 +227,20 @@ const config = {
210227
{
211228
label: 'Mailing List',
212229
href: 'https://groups.google.com/g/wasmedge/'
213-
}, {
230+
},
231+
{
214232
label: 'Discord',
215233
href: 'https://discord.gg/U4B5sFTkFc',
216-
}, {
234+
},
235+
{
217236
label: 'Twitter',
218237
href: 'https://twitter.com/realwasmedge',
219-
}, {
238+
},
239+
{
220240
label: 'Slack #WasmEdge',
221241
href: 'https://cloud-native.slack.com/archives/C0215BBK248'
222-
}, {
242+
},
243+
{
223244
label: 'Community Meeting',
224245
href: 'https://docs.google.com/document/d/1iFlVl7R97Lze4RDykzElJGDjjWYDlkI8Rhf8g4dQ5Rk/edit?usp=sharing'
225246
}

i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/wasinn/mediapipe.md

+4-12
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ sidebar_position: 1
44

55
# Mediapipe solutions
66

7-
Mediapipe is a collection of highly popular AI models developed by Google. They focus on intelligent processing of media files
8-
and streams. The `mediapipe-rs` crate is a Rust library for data processing using the Mediapipe suite of models. The crate provides
9-
Rust APIs to pre-process the data in media files or streams, run AI model inference to analyze the data, and then post-process
10-
or manipulate the media data based on the AI output.
7+
Mediapipe is a collection of highly popular AI models developed by Google. They focus on intelligent processing of media files and streams. The `mediapipe-rs` crate is a Rust library for data processing using the Mediapipe suite of models. The crate provides Rust APIs to pre-process the data in media files or streams, run AI model inference to analyze the data, and then post-process or manipulate the media data based on the AI output.
118

129
## Prerequisite
1310

@@ -63,10 +60,7 @@ DetectionResult:
6360

6461
## Understand the code
6562

66-
The [main.rs](https://github.com/juntao/demo-object-detection/blob/main/src/main.rs) is the complete example Rust source.
67-
All `mediapipe-rs` APIs follow a common pattern. A Rust struct is designed to work with a model. It contains functions
68-
required to pre- and post-process data for the model. For example, we can create an `detector` instance
69-
using the builder pattern, which can build from any "object detection" model in the Mediapipe model library.
63+
The [main.rs](https://github.com/juntao/demo-object-detection/blob/main/src/main.rs) is the complete example Rust source. All `mediapipe-rs` APIs follow a common pattern. A Rust struct is designed to work with a model. It contains functions required to pre- and post-process data for the model. For example, we can create an `detector` instance using the builder pattern, which can build from any "object detection" model in the Mediapipe model library.
7064

7165
```rust
7266
let model_data: &[u8] = include_bytes!("mobilenetv2_ssd_256_uint8.tflite");
@@ -75,17 +69,15 @@ let detector = ObjectDetectorBuilder::new()
7569
.build_from_buffer(model_data)?;
7670
```
7771

78-
The `detect()` function takes in an image, pre-processes it into a tensor array, runs inference on the mediapipe object detection model,
79-
and the post-processes the returned tensor array into a human redable format stored in the `detection_result`.
72+
The `detect()` function takes in an image, pre-processes it into a tensor array, runs inference on the mediapipe object detection model, and the post-processes the returned tensor array into a human redable format stored in the `detection_result`.
8073

8174
```rust
8275
let mut input_img = image::open(img_path)?;
8376
let detection_result = detector.detect(&input_img)?;
8477
println!("{}", detection_result);
8578
```
8679

87-
Furthermore, the `mediapipe-rs` crate provides additional utility functions to post-process the data. For example,
88-
the `draw_detection()` utility function draws the data in `detection_result` onto the input image.
80+
Furthermore, the `mediapipe-rs` crate provides additional utility functions to post-process the data. For example, the `draw_detection()` utility function draws the data in `detection_result` onto the input image.
8981

9082
```rust
9183
draw_detection(&mut input_img, &detection_result);

i18n/zh/docusaurus-plugin-content-docs/current/start/usage/use-cases.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Featuring AOT compiler optimization, WasmEdge is one of the fastest WebAssembly
2020

2121
- WasmEdge applications can be plugged into existing application frameworks or platforms.
2222

23-
If you have any great ideas on WasmEdge, don't hesitate to open a GitHub issue to discuss together.
23+
If you have any great ideas on WasmEdge, don't hesitate to open a GitHub issue to discuss together.

package-lock.json

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"dependencies": {
3232
"@docusaurus/core": "^2.4.0",
3333
"@docusaurus/plugin-google-gtag": "^2.4.1",
34+
"@docusaurus/plugin-sitemap": "^2.4.1",
3435
"@docusaurus/preset-classic": "^2.4.0",
3536
"@docusaurus/theme-mermaid": "^2.4.1",
3637
"@easyops-cn/docusaurus-search-local": "^0.35.0",

0 commit comments

Comments
 (0)