{"id":15102838,"url":"https://github.com/tauri-apps/rustdocusaurus","last_synced_at":"2025-09-27T00:31:48.914Z","repository":{"id":40769593,"uuid":"261587094","full_name":"tauri-apps/rustdocusaurus","owner":"tauri-apps","description":"POC—turning rustdoc generated docs into Docusaurus (MD + sidebar)","archived":true,"fork":false,"pushed_at":"2022-08-18T19:30:16.000Z","size":1790,"stargazers_count":4,"open_issues_count":11,"forks_count":2,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-04-14T10:15:55.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tauri-apps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-05T21:29:09.000Z","updated_at":"2023-05-20T04:21:25.000Z","dependencies_parsed_at":"2022-09-07T14:31:25.283Z","dependency_job_id":null,"html_url":"https://github.com/tauri-apps/rustdocusaurus","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Frustdocusaurus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Frustdocusaurus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Frustdocusaurus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Frustdocusaurus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tauri-apps","download_url":"https://codeload.github.com/tauri-apps/rustdocusaurus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871549,"owners_count":16554426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-25T19:08:05.386Z","updated_at":"2025-09-27T00:31:43.419Z","avatar_url":"https://github.com/tauri-apps.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rustdocusaurus\n\nExperiment to turn a rustdoc generated site into MDX content.\n\n## Usage\n\n**Once you have generated your Rust documentation**, you may use this kind of script:\n\n```js\nconst { transformDocs } = require(\"./main\");\nconst generateSidebar = require(\"./generateSidebar\");\nconst fs = require(\"fs\").promises;\n\n// Where your docs live, should be the folder containing the crates docs\nconst originPath = \"/path/to/project/target/doc/\";\n\n// Where you'll save your MD files\nconst targetPath =\n  \"/path/to/docusaurus/website/docs/api/rust/\";\n\n/*\nWhere lives your sidebars config file\nDoesn't have to be JSON but it's easier to change programmatically, \nyou may create your own saving method\n*/\nconst sidebarPath =\n  \"/path/to/docusaurus/website/sidebars.json\";\n\n// rustdoc uses relative links for crate types relations\nconst linksRoot = \"/docs/api/rust/\";\n\n(async () =\u003e {\n  const sidebarItems = (\n    await Promise.all(\n      [\n        \"crate1\", // Specify which crates you want to process\n        \"crate2\",\n        \"crate3\"\n      ].map(async (crateName) =\u003e ({\n        crateName,\n        docs: await transformDocs(\n          originPath + crateName,\n          originPath,\n          targetPath\n        ),\n      }))\n    )\n  ).map((item) =\u003e generateSidebar(item.docs, item.crateName, originPath));\n\n  // Automatically add the sidebar items to Docusaurus sidebar file config\n  const sidebarContent = JSON.parse(await fs.readFile(sidebarPath, \"utf-8\"));\n  sidebarContent.docs[3].items[2].items = sidebarItems; // Specify where to put the items\n  fs.writeFile(sidebarPath, JSON.stringify(sidebarContent, null, 2));\n\n  console.log(\"Tasks completed!\");\n})();\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Frustdocusaurus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftauri-apps%2Frustdocusaurus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Frustdocusaurus/lists"}