Skip to content

Commit 6db1b62

Browse files
committed
docs: add the rust template
Add the Rust SDK template to the documentation site: the template-rust repo as a docs submodule (pinned to main) and its Docusaurus wiring — a content-docs plugin instance (routeBasePath template-rust/docs), its static directory, and a 'Template Rust' navbar entry. Mirrors the other technology templates; npm run build passes.
1 parent 991917b commit 6db1b62

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@
2121
path = template-docs/template-java
2222
url = https://github.com/apigear-io/template-java.git
2323
branch = main
24+
[submodule "template-docs/template-rust"]
25+
path = template-docs/template-rust
26+
url = https://github.com/apigear-io/template-rust.git
27+
branch = main

docusaurus.config.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const config = {
4848
'template-docs/template-cpp14/docs/static',
4949
'template-docs/template-qt6/docs/static',
5050
'template-docs/template-python/docs/static',
51-
'template-docs/template-java/docs/static'
51+
'template-docs/template-java/docs/static',
52+
'template-docs/template-rust/docs/static'
5253
],
5354

5455
presets: [
@@ -156,6 +157,18 @@ const config = {
156157
showLastUpdateTime: false,
157158
},
158159
],
160+
[
161+
'@docusaurus/plugin-content-docs',
162+
{
163+
id: 'template-rust',
164+
path: 'template-docs/template-rust/docs/docs',
165+
routeBasePath: 'template-rust/docs',
166+
sidebarPath: undefined,
167+
editUrl: ({docPath}) =>
168+
`https://github.com/apigear-io/template-rust/edit/main/docs/docs/${docPath}`,
169+
showLastUpdateTime: false,
170+
},
171+
],
159172
[
160173
require.resolve('docusaurus-lunr-search'),
161174
{
@@ -250,6 +263,7 @@ const config = {
250263
{type: 'doc', docsPluginId: 'template-qt6', docId: 'intro', label: 'Template Qt6'},
251264
{type: 'doc', docsPluginId: 'template-python', docId: 'intro', label: 'Template Python'},
252265
{type: 'doc', docsPluginId: 'template-java', docId: 'intro', label: 'Template Java'},
266+
{type: 'doc', docsPluginId: 'template-rust', docId: 'intro', label: 'Template Rust'},
253267
],
254268
},
255269
{

template-docs/template-rust

Submodule template-rust added at 93f1af0

0 commit comments

Comments
 (0)