|
1 | 1 | # How To Contribute |
2 | 2 |
|
| 3 | +<!-- cspell:words mkdocs pymdownx winget --> |
| 4 | + |
3 | 5 | ## Quick Start |
4 | 6 |
|
5 | 7 | * Brand new to Git and GitHub? Check out our [New User Guide](https://microsoft.github.io/CSS-Exchange/NewUserGuide/). |
@@ -128,3 +130,77 @@ provides word-wrapping of table values. Search for it in the repo to see how dif |
128 | 130 | ### Other stuff |
129 | 131 |
|
130 | 132 | Check out the Shared folder. |
| 133 | + |
| 134 | +## Documentation |
| 135 | + |
| 136 | +The documentation site at https://microsoft.github.io/CSS-Exchange is built with [MkDocs Material](https://squidfunk.github.io/mkdocs-material/). Pages are Markdown files in the `docs/` folder, and navigation is configured in `mkdocs.yml`. |
| 137 | + |
| 138 | +### Previewing Locally |
| 139 | + |
| 140 | +To preview documentation changes locally, you need Python 3 installed. |
| 141 | + |
| 142 | +**Install Python (if not already installed):** |
| 143 | + |
| 144 | +```powershell |
| 145 | +winget install Python.Python.3.12 |
| 146 | +``` |
| 147 | + |
| 148 | +Close and reopen your terminal after installing so Python is available on your PATH. |
| 149 | + |
| 150 | +**Install MkDocs dependencies:** |
| 151 | + |
| 152 | +```powershell |
| 153 | +pip install mkdocs-material mkdocs-git-revision-date-localized-plugin |
| 154 | +``` |
| 155 | + |
| 156 | +**Start the local preview server from the repository root:** |
| 157 | + |
| 158 | +```powershell |
| 159 | +cd C:\GitHub\CSS-Exchange # or wherever you cloned the repo |
| 160 | +mkdocs serve |
| 161 | +``` |
| 162 | + |
| 163 | +Then open `http://127.0.0.1:8000/CSS-Exchange/` in your browser. The server must be run from the directory containing `mkdocs.yml`. |
| 164 | + |
| 165 | +**Note:** The server watches for file changes and automatically rebuilds. However, if changes don't appear after saving a file, stop the server with `Ctrl+C` and restart it with `mkdocs serve`. Some changes (especially structural ones) require a full restart to take effect. You may also need to hard refresh your browser (`Ctrl+Shift+R`) to bypass the browser cache. |
| 166 | + |
| 167 | +### Emerging Issues Page |
| 168 | + |
| 169 | +The [Emerging Issues](https://microsoft.github.io/CSS-Exchange/Emerging-Issues/) page uses MkDocs collapsible admonitions instead of tables. The MkDocs config already enables `admonition` and `pymdownx.details` to support this. |
| 170 | + |
| 171 | +**Current issues** use `???+ warning` (expanded by default, yellow/orange styling): |
| 172 | + |
| 173 | +```markdown |
| 174 | +???+ warning "8/18/2025 — Short description of the issue" |
| 175 | + **Update causing the issue:** Description or link to the update |
| 176 | + |
| 177 | + **Issue:** Description of what goes wrong. |
| 178 | + |
| 179 | + **Workaround/Solution:** Steps to resolve. |
| 180 | +``` |
| 181 | + |
| 182 | +**Old/resolved issues** use `??? note` (collapsed by default, blue styling): |
| 183 | + |
| 184 | +```markdown |
| 185 | +??? note "4/23/2024 — Short description of the issue" |
| 186 | + **Update causing the issue:** Description or link to the update |
| 187 | + |
| 188 | + **Issue:** Description of what goes wrong. |
| 189 | + |
| 190 | + **Workaround/Solution:** Steps to resolve. |
| 191 | +``` |
| 192 | + |
| 193 | +**Formatting guidelines:** |
| 194 | + |
| 195 | +- Use fenced code blocks for multi-line error messages: |
| 196 | + |
| 197 | + ````markdown |
| 198 | + ``` |
| 199 | + Error 1935. An error occurred during the installation of assembly... |
| 200 | + ``` |
| 201 | + ```` |
| 202 | + |
| 203 | +- Use inline code for short error strings: `` `The modified Permissions cannot be changed.` `` |
| 204 | +- Move issues from Current Issues to Old Issues when they are resolved, changing `???+ warning` to `??? note` |
| 205 | + |
| 206 | +**Note:** These admonitions will not render in VS Code's built-in Markdown preview. Use the local MkDocs server described above to preview how they will appear on the site. |
0 commit comments