MkDocs IDM Theme
A custom MkDocs theme for the Institute for Disease Modeling, based on Material for MkDocs with enhanced features for scientific documentation.
Installation
Install the theme using pip:
pip install mkdocs-idm
Usage
Add the theme to your mkdocs.yml by starting with the template provided on github.
Note that you'll also need to setup the structure of the site under the nav section and update a few links (search for TODO in the template).
Documentation
For detailed documentation and examples, visit the sharepoint
MkDocs Templates and Guidance
This content is shared from the README into the "MkDocs Introduction" topic using include-markdown. This folder is set up both to introduce you to the syntax and build processes for Material with MkDocs and provide standard configuration and templates for setting up a new documentation set. This folder contains all the source files needed to build HTML docs with MkDocs and host them on GH-Pages. We recommend placing all files in the repository you want to document and updating the Markdown and mkdocs.yml files as needed.
For MkDocs, the mkdocs.yml file controls most aspects of the documentation build, style, table of contents, and plug-in functionality. The minimal files under customization/ are needed to meet GF requirements and should not require frequent updates. Avoid adding any other CSS or Javascript customization as it makes the doc build fragile and difficult to maintain consistency. For more information, see the MkDocs documentation.
README guidance
In the package README, include the following:
- An overview of the package and its usage
- Installation instructions
- A link to the hosted documentation at https://docs.idmod.org/project
- Package structure overview
- Disclaimer/license
Doc builds and previews
You should build or preview the documentation locally before submitting documentation changes.
Preview the docs in a browser
-
Run a local server with:
mkdocs serve --watch .The
watchoption will rebuild on changes outside the docs/ folder, such as docstring changes. -
Open a browser window at http://127.0.0.1:8000/. This will rebuild to reflect changes each time a source file is updated and saved.
Build the docs
- Build the documents:
mkdocs build - The built documents will be in
site/.
Hosting
Under .github/ there are GH-Actions files for running a test doc build when PRs are opened and pushing changes to GH-Pages when PRs are merged. The default URL for GH-Pages is org.github.io/repo, but when documentation is ready to share broadly, you should set up a custom domain following the URL structure docs.idmod.org/project (and specify this in mkdocs.yml). For more information, see GitHub Docs. Coordinate with the research content team to add the CNAME record and set up a link on the docs.idmod.org landing page and a tool page on idmod.org .
Style guidance
Microsoft Manual of Style
At IDM, we generally follow the Microsoft Manual of Style (MSTP). A few of the most notable rules to be aware of are listed below.
- Use imperative verbs for tutorial and how to titles, no gerunds. "Get Started" not "Getting Started."
- Use the Oxford comma (serial comma).
- Don't use "should"--it's ambiguous. Rather, say a user must do something or that a computer/system will do something.
- Verb tense and voice
- In general, use present tense and active voice.
- Use primarily second-person (you).
- Use first-person (I or we) sparingly. For example, "We recommend…" is more natural than "It is recommended that."
- Be direct and use simple sentence structure.
- Avoid jargon.
- Don't use i.e. or e.g. as they can cause problems for non-native English speakers or machine translation.
Tutorial/how to guidelines are extensive (see chapter 6.) The primary points to follow are:
- Sentences must provide the context and then the action. For example, "In the Print dialog box, click All."
- Each step must encompass a single action, unless they are short and occur in the same place.
- Additionally, you "click", you don't "click on."
- Generally avoid using "please" and "thank you."
- Use imperative mood verbs. In other words, verbs should take the form of commands. For example, "Enter your password" not "The user enters their password."
- Consecutive list items should be separated by > and not ,. For example, "Select Explore > Experiments".
Differences from MSTP
Our house style guide differs from MSTP guidance in the following ways:
-
Use title case (major words capitalized) for topic titles.
-
Use sentence case (only the first word and proper nouns capitalized) for section headings.
-
Use bold, not italics, for parameter names.
-
Parameter values, which are often in all-caps, are in plain text.
-
Surround placeholder text with angle brackets.
-
For example, text where users are expected to enter their username C:/Users/.
-
Italicize species names. For example, A. funestus and A. gambiae.
- A note on mosquito names: for scientific naming convention, the first time you mention a species you give its full name (Anopheles funestus), and then the second time you can abbreviate the genus (A. funestus). However, there are two "A" mosquito genera that are commonly discussed in the disease literature (Aedes and Anopheles), so it's convention to use the first two letters of the genus name when abbreviating: An. funestus and Ae. aegypti. For pretty much every other category of organism, you'll just use the first letter and not the first two.
Migrating existing content from Sphinx
-
ChatGPT and Copilot work reasonably well to convert existing RST files to Markdown. Carefully review the output for any remaining issues, however. Documentation migrations are often a good time to review the content of the docs and not just the format.
-
Links use a different format.
- General links specify the link text manually rather than being generated from the topic title, so be sure to check that link text and topic titles stay in sync.
[link text](URL/relative path)- For Python objects, the link format will need to be updated from Sphinx syntax to MkDocs syntax:
:py:func:`add_drug_campaign` to [Arr][starsim.Arr]- Instead of intersphinx to link to other package objects, use mkdocstrings inventories.
-
Headings and titles use pound signs instead of underlining. In docstrings, the additional formatting around the Examples heading needed for Sphinx is no longer necessary.
-
Instead of
literalincludeorincludedirectives to reuse content, use snippets. -
Including math with LaTeX no longer requires a separate installation. Use $\beta$ for inline math and the following for blocks: $$ \int_a^b f(x) dx = F(b) - F(a) $$
-
Paragraphs with text lines with more than two trailing spaces will create a soft break, so we recommend pulling paragraphs on a single line or configuring your editor to trim trailing spaces to avoid inadvertent breaks.
Metadata
Release files for mkdocs-idm 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mkdocs_idm-1.3.1.tar.gz | 144.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mkdocs_idm-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 288.6 kB
Release files / mkdocs_idm-1.3.1.tar.gz
| Download URL | mkdocs_idm-1.3.1.tar.gz |
|---|---|
| Size | 144.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3c4f23dcb761365ae98765f1890bfa3deb3cd78533b007173878dc6ecccec6b
|
|
BLAKE2b-256 checksum How to use checksums |
5e8c8b6080b11f8a6a80ee28418bc7b2bddaec358f7e4df0a0430fa620b10ef7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 6, 2025.
Transparency logRelease files / mkdocs_idm-1.3.1-py3-none-any.whl
| Download URL | mkdocs_idm-1.3.1-py3-none-any.whl |
|---|---|
| Size | 143.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee7a1f57a20e9e6614d00e0b9c04a50ebed2361f06ae2755bbbc1601c53fb187
|
|
BLAKE2b-256 checksum How to use checksums |
242b817e1026fd3ccfddf9fc5ab1762cdcdf92c35d747e3c64523e244ee30e86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 6, 2025.
Transparency log