Dev
Developer Notes¶
This document provides notes for developers working on this project.
Overriding Theme Files¶
This project uses a custom version of the mkdocs-material theme. The customizations are located in the material/ directory.
To override a theme file (e.g., a partial like header.html or alternate.html), you need to:
-
Find the original file: The original theme files are located inside the Docker container at
(Note: this requires temporarily changing the/usr/local/lib/python3.11/site-packages/material/templates/. You can explore the container's file system by running:entrypointindocker-compose.yamltolsand thecommandto-R /usr/local/lib/python3.11/site-packages/material) -
Copy the original file to the overrides directory: Once you have the path to the original file, you can copy its content to the
material/overrides/directory, preserving the same directory structure. For example, to overridepartials/header.html, you would copy its content tomaterial/overrides/partials/header.html. -
Modify the copied file: You can now modify the copied file in
material/overrides/to apply your customizations.
Overriding Icons¶
To override an icon used in the theme:
- Create SVG files: Create your custom SVG icons.
- Place the SVG files in the
.iconsdirectory: Place your custom SVG files in thematerial/overrides/.icons/directory. If this directory doesn't exist, you need to create it. - Update
mkdocs.yml: Inmkdocs.yml, find thetheme.iconsection and update the path to your custom icon. For example, to use a customlink.svgicon, you would change: to:
Local Development¶
To run the site locally for development, you can use the following command:
The site will be available athttp://localhost:8500. Remember that after making changes to the theme files, you might need to rebuild the Docker image to see the changes. You can do this by running: