mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-07-09 20:09:28 +02:00
This pull request adds a custom `docmd` plugin to improve how documentation links to source files are handled, ensuring that repo-root-relative links work both when editing locally and on the published site. The main changes include introducing the new plugin, updating configuration to use it, and documenting its behavior. **Plugin integration and configuration:** * Added a new local plugin `github-source-links` in `docmd-plugins/`, which rewrites repo-root-relative links (e.g., `/src/.../Foo.cpp`) in Markdown files to absolute GitHub blob URLs during the documentation build process, ensuring links remain functional on the published site. [[1]](diffhunk://#diff-c2c746e6974a6cfdd229031c2977f2bb0dca37c6d5f598ed45dc0d9f0b74c7caR1-R52) [[2]](diffhunk://#diff-a97f3ce59c97313aacd716b9874b445d162c45ee2e6ef9fd2db59fe17235e1cfR1-R8) * Updated `docmd.config.json` to register the new plugin under the `plugins` key, enabling it for documentation builds. * Updated `package.json` to include the plugin as a dependency, referencing the local plugin directory. **Documentation updates:** * Updated `README.md` to document the new `docmd-plugins/` folder, explain the purpose of repo-root-relative links, and describe how the plugin rewrites these links for the published site.
17 lines
400 B
JSON
17 lines
400 B
JSON
{
|
|
"name": "powertoys-devdocs-website",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"description": "Static Dev Docs website generated from doc/devdocs with docmd.",
|
|
"scripts": {
|
|
"dev": "docmd dev",
|
|
"build": "docmd build"
|
|
},
|
|
"dependencies": {
|
|
"docmd-plugin-github-source-links": "file:./docmd-plugins/github-source-links"
|
|
},
|
|
"devDependencies": {
|
|
"@docmd/core": "0.8.6"
|
|
}
|
|
}
|