[DOCS] Add auto-generated github page for dev docs (#48752)
This pull request introduces a new, automated workflow for building and
publishing the developer documentation website using
[docmd](https://docmd.io/). The static site is now generated from
`doc/devdocs`, built in the `doc/devdocs-website` folder, and deployed
to GitHub Pages via a GitHub Actions workflow. The build output is not
committed to the repository but is instead published as an artifact.
Supporting configuration files, documentation, and `.gitignore` entries
are also added to streamline local development and CI/CD.
**Automated build and deployment:**
* Added `.github/workflows/regenerate-devdocs-website.yml` to build the
static site with docmd and deploy it to GitHub Pages automatically on
changes to `doc/devdocs` or `doc/devdocs-website`, or via manual
trigger.
**Project setup and configuration:**
* Added `doc/devdocs-website/package.json` to define the Node.js
project, pin the docmd version, and provide scripts for local
development and builds.
* Added `doc/devdocs-website/docmd.config.json` to configure docmd (site
title, source, output directory, base path).
* Added `doc/devdocs-website/.npmrc` to disable lockfile generation,
ensuring fresh dependency installs each build.
**Documentation and housekeeping:**
* Added `doc/devdocs-website/README.md` with instructions for editing,
building, and publishing the docs website.
* Added `doc/devdocs-website/.gitignore` to exclude the generated
`site/` output from version control.
2026-06-19 13:59:12 -07:00
|
|
|
# Dev Docs Website
|
|
|
|
|
|
|
|
|
|
This folder hosts the [docmd](https://docmd.io/) project that turns the PowerToys developer
|
|
|
|
|
documentation in [`doc/devdocs`](../devdocs) into a static website.
|
|
|
|
|
|
|
|
|
|
## Generated site
|
|
|
|
|
|
|
|
|
|
The `site/` folder is the docmd build output. It is **not committed** to the repository — it is
|
|
|
|
|
git-ignored and rebuilt on demand. You only need it locally when previewing your changes (see below).
|
|
|
|
|
|
|
|
|
|
Publishing is handled by the
|
|
|
|
|
[Publish Dev Docs Website](../../.github/workflows/regenerate-devdocs-website.yml) GitHub Action, which
|
|
|
|
|
runs whenever files under `doc/devdocs` (or this folder) change on the `main` branch — it can also
|
|
|
|
|
be triggered manually from the **Actions** tab. The action builds the site and deploys it straight to
|
|
|
|
|
GitHub Pages as an artifact, so nothing is written back to the repository.
|
|
|
|
|
|
|
|
|
|
> [!NOTE]
|
|
|
|
|
> The action requires GitHub Pages to be enabled with **Source: GitHub Actions** under the repository
|
|
|
|
|
> **Settings → Pages**.
|
|
|
|
|
|
|
|
|
|
## Editing the docs
|
|
|
|
|
|
|
|
|
|
To change the documentation, edit the Markdown files under [`doc/devdocs`](../devdocs). The remaining
|
|
|
|
|
files in this folder are maintained by hand and are safe to edit:
|
|
|
|
|
|
[DOCS] docmd links to source files normalization (#48754)
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.
2026-06-19 15:09:20 -07:00
|
|
|
- `docmd.config.json` — docmd configuration (title, source, output, plugins)
|
[DOCS] Add auto-generated github page for dev docs (#48752)
This pull request introduces a new, automated workflow for building and
publishing the developer documentation website using
[docmd](https://docmd.io/). The static site is now generated from
`doc/devdocs`, built in the `doc/devdocs-website` folder, and deployed
to GitHub Pages via a GitHub Actions workflow. The build output is not
committed to the repository but is instead published as an artifact.
Supporting configuration files, documentation, and `.gitignore` entries
are also added to streamline local development and CI/CD.
**Automated build and deployment:**
* Added `.github/workflows/regenerate-devdocs-website.yml` to build the
static site with docmd and deploy it to GitHub Pages automatically on
changes to `doc/devdocs` or `doc/devdocs-website`, or via manual
trigger.
**Project setup and configuration:**
* Added `doc/devdocs-website/package.json` to define the Node.js
project, pin the docmd version, and provide scripts for local
development and builds.
* Added `doc/devdocs-website/docmd.config.json` to configure docmd (site
title, source, output directory, base path).
* Added `doc/devdocs-website/.npmrc` to disable lockfile generation,
ensuring fresh dependency installs each build.
**Documentation and housekeeping:**
* Added `doc/devdocs-website/README.md` with instructions for editing,
building, and publishing the docs website.
* Added `doc/devdocs-website/.gitignore` to exclude the generated
`site/` output from version control.
2026-06-19 13:59:12 -07:00
|
|
|
- `package.json` — pins the docmd version used to build the site
|
[DOCS] docmd links to source files normalization (#48754)
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.
2026-06-19 15:09:20 -07:00
|
|
|
- `docmd-plugins/` — local build-time docmd plugins
|
|
|
|
|
|
|
|
|
|
> [!TIP]
|
|
|
|
|
> Link to repository files with repo-root-relative paths such as `/src/modules/.../Foo.cpp`.
|
|
|
|
|
> VS Code resolves these against the workspace root (so they open the local file), and the
|
|
|
|
|
> bundled `github-source-links` plugin rewrites them to
|
|
|
|
|
> `https://github.com/microsoft/PowerToys/blob/main/...` on the published site.
|
[DOCS] Add auto-generated github page for dev docs (#48752)
This pull request introduces a new, automated workflow for building and
publishing the developer documentation website using
[docmd](https://docmd.io/). The static site is now generated from
`doc/devdocs`, built in the `doc/devdocs-website` folder, and deployed
to GitHub Pages via a GitHub Actions workflow. The build output is not
committed to the repository but is instead published as an artifact.
Supporting configuration files, documentation, and `.gitignore` entries
are also added to streamline local development and CI/CD.
**Automated build and deployment:**
* Added `.github/workflows/regenerate-devdocs-website.yml` to build the
static site with docmd and deploy it to GitHub Pages automatically on
changes to `doc/devdocs` or `doc/devdocs-website`, or via manual
trigger.
**Project setup and configuration:**
* Added `doc/devdocs-website/package.json` to define the Node.js
project, pin the docmd version, and provide scripts for local
development and builds.
* Added `doc/devdocs-website/docmd.config.json` to configure docmd (site
title, source, output directory, base path).
* Added `doc/devdocs-website/.npmrc` to disable lockfile generation,
ensuring fresh dependency installs each build.
**Documentation and housekeeping:**
* Added `doc/devdocs-website/README.md` with instructions for editing,
building, and publishing the docs website.
* Added `doc/devdocs-website/.gitignore` to exclude the generated
`site/` output from version control.
2026-06-19 13:59:12 -07:00
|
|
|
|
|
|
|
|
## Building locally
|
|
|
|
|
|
|
|
|
|
Requires [Node.js](https://nodejs.org/).
|
|
|
|
|
|
|
|
|
|
```powershell
|
|
|
|
|
npm install # install dependencies (first time only)
|
|
|
|
|
npm run dev # start a local preview server at http://localhost:3000
|
|
|
|
|
npm run build # generate the static site into ./site
|
|
|
|
|
```
|