This style guide is forked from the Microsoft Style Guide. This repo will gradually diverge from upstream as needed.
The purpose of this style guide is to have an updated digital style guide for easier reference and future automation integration.
We use a combination of the MkDocs framework with the Material theme to build the static documentation site.
Create a folder to contain the virtual environment.
Run the following command to create a virtual environment in the folder:
python -m venv NewVenvName- On Windows:
NewVenvName\Scripts\activate
- On Linux:
source NewVenvName/bin/activate
You will need pip to install both MkDocs and Material.
- Run
pip install mkdocsto install MkDocs on your machine. - Run
pip install mkdocs-materialto install the Material theme. - Run
pip install mkdocs-macros-pluginto install the Macros plugin. - Optionally, run
pip install mcp fastmcpto install the requirements for the MCP server.
To deactivate the Virtual Environment, run:
deactivateor
exit-
Create a folder for cloning the repository in a location of your choice.
-
Navigate to the folder and run:
git clone https://github.com/NordicPlayground/test-style-guide
- Navigate to the Virtual Environment folder and activate the Virtual Environment:
- On Windows:
(Path_to_VE)\Scripts\activate
- On macOS/Linux:
source bin/activate
- On Windows:
- To preview the documentation site while you work in real time, use
mkdocs servefrom the Terminal. The site will be previewable on your local server at127.0.0.1:8000. Press Ctrl+C to shut down the local server.
This repo also contains a small MCP server to serve the style guide documentation to AI tools. It is located in the /tools/tiny_docs_mcp.py python script.
It requires mcp and fastmcp python dependencies (see the previous chapter).
To configure Cursor for using the MCP server, add the following to your mcp.json:
{
"mcpServers": {
"nordic-style-guide": {
"command": "path/to/venv/python", ### use python3 if necessary "path/to/venv/python3"
"args": [
"/path/to/nordic-techdocs-style-guide/tools/tiny_docs_mcp.py"
],
"cwd": "/path/to/nordic-techdocs-style-guide"
}
}
}
This mcp.json syntax as the basis for either your workspace-wide or system-wide mcp server configuration.
You can also add the same configuration going to File/preferences/cursor settings/Tools and MCP
After that, restart cursor.
Work in progress.