| title | Contributing |
|---|
This guide explains how to contribute to Silmärin.
Silmärin does not accept external contributions. This guide is exclusively intended for use by Lumikeiju and the Moonlight Librarian.
This project follows standardized version control conventions:
Silmärin uses Semantic Versioning (MAJOR.MINOR.PATCH):
- Major (X.0.0):
- Core: New major features or upgrades
- Docs: Changes to structure/navigation that break external links
- Minor (0.X.0):
- Core: Significant changes to core features
- Docs: New documentation or major reworks
- Patch (0.0.X):
- Core: Minor fixes, fixing typos, completing chores
- Docs: Small updates, fixing typos, adding images
The version number is stored in the CHANGELOG.md file.
Commits follow Conventional Commits with scoping:
feat: description- Core features or Docs contentfix: description- Core patches or Docs corrections
Examples:
feat: add abbreviations plugin
feat: add user manual page
fix: fix nav generator logic
fix: fix typo
Follow GitHub flow with structured branch names:
Format: type/scope/short-description
Examples:
feat/add-abbreviations-plugin
feat/add-user-manual-page
fix/fix-nav-generator-logic
fix/fix-typo
- Create a feature branch following the naming convention
- Make commits using conventional commit format
- Open a pull request to
main - Upon merge to
main, releases are automated
This section of the guide explains how to set up a Windows environment for contributing to Silmärin for the first time.
-
Install Visual Studio Code
- Install VS Code Extensions
-
Clone the repository
git clone https://github.com/lumikeiju/silmarin cd silmarin
-
Install Python
-
Set up Python virtual environment
-
Create the virtual environment
python3 -m venv .venv -
Activate the virtual environment
.\.venv\Scripts\Activate.ps1
-
-
Install requirements
pip install -r requirements.txt
Refer to the documentation for Zensical.
Where possible, follow these guidelines for images:
-
Format: 24-bit
.png -
Resizing: Scale images using
{ width="123" }:{ width="300" }
Refer to Zensical: Images for more information.
For creating screenshots with a consistent style, Firefox DevTools is to be used.
-
Open Firefox DevTools
(
F12) -
Open Responsive Design View
(
Ctrl+Shift+M) -
Add custom device profiles:
-
Name:
[Screenshot] Web - Portrait-
Size:
810x1440 -
Device Pixel Ratio:
1 -
User Agent String:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
-
-
Name:
[Screenshot] Web - Landscape-
Size:
1440x810 -
Device Pixel Ratio:
1 -
User Agent String:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
-
-
-
It is recommended to remove all embedded metadata, such as with the use of ExifToolGUI.
-
Process screenshots with the
process-screenshot.pyutility to generate themed light/dark variants with borders and drop shadows:# Ensure venv is activated first! ..\.venv\Scripts\Activate.ps1 # Process a single screenshot python .\utilities\process-screenshot.py docs\resources\images\example\screenshot.png # Process all images in a directory python .\utilities\process-screenshot.py docs\resources\images\example\ # Process recursively with a custom profile python .\utilities\process-screenshot.py docs\resources\images\ --recurse --profile moonlight # Regenerate existing output files python .\utilities\process-screenshot.py screenshot.png --overwrite
The script produces two variants per input image, saved as maximally-compressed lossless PNGs:
{name}-light.png— dark border + drop shadow for light theme pages{name}-dark.png— light border + glow for dark theme pages
Reference them in Markdown with Zensical's theme-switching fragments:
 
Mode-tagged source files (e.g.,
image.light.png,image.dark.png) generate only the matching variant. Run with--helpfor all options including per-variant color/shadow overrides.
- Create QR codes using Project Nayuki's QR Code generator library.