relcon-docs 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- relcon_docs-0.1.0/.github/workflows/ci.yml +34 -0
- relcon_docs-0.1.0/.github/workflows/deploy-docs.yml +51 -0
- relcon_docs-0.1.0/.github/workflows/docs.yml +18 -0
- relcon_docs-0.1.0/.github/workflows/publish.yml +48 -0
- relcon_docs-0.1.0/.gitignore +8 -0
- relcon_docs-0.1.0/.relcon-docs/base.yml +63 -0
- relcon_docs-0.1.0/.relcon-docs/state.json +9 -0
- relcon_docs-0.1.0/AGENTS.md +12 -0
- relcon_docs-0.1.0/CHANGELOG.md +32 -0
- relcon_docs-0.1.0/LICENSE +21 -0
- relcon_docs-0.1.0/PKG-INFO +262 -0
- relcon_docs-0.1.0/README.md +245 -0
- relcon_docs-0.1.0/docs/diagrams.md +99 -0
- relcon_docs-0.1.0/docs/equations.md +53 -0
- relcon_docs-0.1.0/docs/figures.md +59 -0
- relcon_docs-0.1.0/docs/images/research-workflow.svg +22 -0
- relcon_docs-0.1.0/docs/index.md +262 -0
- relcon_docs-0.1.0/docs/javascripts/relcon-docs-math.js +34 -0
- relcon_docs-0.1.0/docs/markdown.md +139 -0
- relcon_docs-0.1.0/docs/stylesheets/relcon-docs.css +111 -0
- relcon_docs-0.1.0/mkdocs.yml +10 -0
- relcon_docs-0.1.0/pyproject.toml +43 -0
- relcon_docs-0.1.0/src/relcon_docs/__init__.py +1 -0
- relcon_docs-0.1.0/src/relcon_docs/assets/base.yml +63 -0
- relcon_docs-0.1.0/src/relcon_docs/assets/docs.yml +23 -0
- relcon_docs-0.1.0/src/relcon_docs/assets/relcon-docs-math.js +34 -0
- relcon_docs-0.1.0/src/relcon_docs/assets/relcon-docs.css +111 -0
- relcon_docs-0.1.0/src/relcon_docs/cli.py +243 -0
- relcon_docs-0.1.0/tests/test_configure.py +287 -0
- relcon_docs-0.1.0/tests/test_diagram_colors.py +48 -0
- relcon_docs-0.1.0/uv.lock +691 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
workflow_call:
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
jobs:
|
|
11
|
+
checks:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
15
|
+
- uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
|
|
16
|
+
- run: uv sync --locked
|
|
17
|
+
- run: uv run pytest
|
|
18
|
+
- run: uv run ruff check .
|
|
19
|
+
- run: uv run ruff format --check .
|
|
20
|
+
- run: uv run relcon-docs configure --check
|
|
21
|
+
- run: uv run zensical build --strict
|
|
22
|
+
- run: uv build
|
|
23
|
+
- name: Verify installed wheel outside checkout
|
|
24
|
+
shell: bash
|
|
25
|
+
run: |
|
|
26
|
+
uv venv /tmp/relcon-docs-wheel
|
|
27
|
+
uv pip install --python /tmp/relcon-docs-wheel/bin/python dist/*.whl
|
|
28
|
+
mkdir -p /tmp/relcon-docs-example/docs
|
|
29
|
+
cd /tmp/relcon-docs-example
|
|
30
|
+
/tmp/relcon-docs-wheel/bin/relcon-docs configure
|
|
31
|
+
test -f .github/workflows/docs.yml
|
|
32
|
+
/tmp/relcon-docs-wheel/bin/relcon-docs configure --check
|
|
33
|
+
echo '# Wheel smoke test' > docs/index.md
|
|
34
|
+
/tmp/relcon-docs-wheel/bin/zensical build --strict
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: Deploy documentation
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
inputs:
|
|
5
|
+
python-version:
|
|
6
|
+
description: Python version used to build the caller's documentation
|
|
7
|
+
type: string
|
|
8
|
+
default: "3.11"
|
|
9
|
+
uv-version:
|
|
10
|
+
description: uv version used to install the caller's locked docs dependencies
|
|
11
|
+
type: string
|
|
12
|
+
default: "0.13.6"
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
# Serialize Pages deployments in the caller repository, including releases.
|
|
18
|
+
concurrency:
|
|
19
|
+
group: github-pages
|
|
20
|
+
cancel-in-progress: false
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
27
|
+
with:
|
|
28
|
+
persist-credentials: false
|
|
29
|
+
- uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
|
|
30
|
+
with:
|
|
31
|
+
version: ${{ inputs.uv-version }}
|
|
32
|
+
python-version: ${{ inputs.python-version }}
|
|
33
|
+
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
|
|
34
|
+
- run: uv sync --locked --group docs
|
|
35
|
+
- run: uv run --group docs relcon-docs configure --check
|
|
36
|
+
- run: uv run --group docs zensical build --strict
|
|
37
|
+
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
|
|
38
|
+
with:
|
|
39
|
+
path: site
|
|
40
|
+
deploy:
|
|
41
|
+
needs: build
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
permissions:
|
|
44
|
+
pages: write
|
|
45
|
+
id-token: write
|
|
46
|
+
environment:
|
|
47
|
+
name: github-pages
|
|
48
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
|
|
51
|
+
id: deployment
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# This repository uses its own reusable workflow from the same revision.
|
|
2
|
+
name: Deploy documentation
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
jobs:
|
|
10
|
+
checks:
|
|
11
|
+
uses: ./.github/workflows/ci.yml
|
|
12
|
+
docs:
|
|
13
|
+
needs: checks
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
pages: write
|
|
17
|
+
id-token: write
|
|
18
|
+
uses: ./.github/workflows/deploy-docs.yml
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
concurrency:
|
|
8
|
+
group: pypi-release
|
|
9
|
+
cancel-in-progress: false
|
|
10
|
+
jobs:
|
|
11
|
+
checks:
|
|
12
|
+
uses: ./.github/workflows/ci.yml
|
|
13
|
+
build:
|
|
14
|
+
needs: checks
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
18
|
+
with:
|
|
19
|
+
persist-credentials: false
|
|
20
|
+
- uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e
|
|
21
|
+
with:
|
|
22
|
+
version: "0.13.6"
|
|
23
|
+
python-version: "3.11"
|
|
24
|
+
- name: Validate release tag
|
|
25
|
+
env:
|
|
26
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
27
|
+
run: |
|
|
28
|
+
uv run --no-project python -c "import os, tomllib; version = tomllib.load(open('pyproject.toml', 'rb'))['project']['version']; assert os.environ['RELEASE_TAG'] == 'v' + version, 'Release tag must match package version'"
|
|
29
|
+
- run: uv build
|
|
30
|
+
- run: uvx --from twine twine check --strict dist/*
|
|
31
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
32
|
+
with:
|
|
33
|
+
name: distributions
|
|
34
|
+
path: dist/
|
|
35
|
+
publish:
|
|
36
|
+
needs: build
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
environment:
|
|
39
|
+
name: pypi
|
|
40
|
+
url: https://pypi.org/p/relcon-docs
|
|
41
|
+
permissions:
|
|
42
|
+
id-token: write
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
45
|
+
with:
|
|
46
|
+
name: distributions
|
|
47
|
+
path: dist/
|
|
48
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Managed by relcon-docs configure. Do not edit this file.
|
|
2
|
+
# Put project overrides in mkdocs.yml. Paths are relative to that file.
|
|
3
|
+
extra_css:
|
|
4
|
+
- stylesheets/relcon-docs.css
|
|
5
|
+
extra_javascript:
|
|
6
|
+
- javascripts/relcon-docs-math.js
|
|
7
|
+
theme:
|
|
8
|
+
variant: modern
|
|
9
|
+
font: false
|
|
10
|
+
features:
|
|
11
|
+
- content.action.copy
|
|
12
|
+
- content.tabs.link
|
|
13
|
+
- content.code.copy
|
|
14
|
+
- navigation.tabs
|
|
15
|
+
- navigation.top
|
|
16
|
+
- search.highlight
|
|
17
|
+
palette:
|
|
18
|
+
- media: (prefers-color-scheme)
|
|
19
|
+
toggle:
|
|
20
|
+
icon: lucide/sun-moon
|
|
21
|
+
name: Switch to light mode
|
|
22
|
+
- media: '(prefers-color-scheme: light)'
|
|
23
|
+
scheme: default
|
|
24
|
+
toggle:
|
|
25
|
+
icon: lucide/sun
|
|
26
|
+
name: Switch to dark mode
|
|
27
|
+
- media: '(prefers-color-scheme: dark)'
|
|
28
|
+
scheme: slate
|
|
29
|
+
toggle:
|
|
30
|
+
icon: lucide/moon
|
|
31
|
+
name: Switch to system preference
|
|
32
|
+
markdown_extensions:
|
|
33
|
+
toc:
|
|
34
|
+
permalink: true
|
|
35
|
+
permalink_title: Link to this section
|
|
36
|
+
pymdownx.arithmatex:
|
|
37
|
+
generic: true
|
|
38
|
+
admonition: {}
|
|
39
|
+
pymdownx.details: {}
|
|
40
|
+
pymdownx.highlight: {}
|
|
41
|
+
pymdownx.superfences:
|
|
42
|
+
custom_fences:
|
|
43
|
+
- name: mermaid
|
|
44
|
+
class: mermaid
|
|
45
|
+
format: pymdownx.superfences.fence_code_format
|
|
46
|
+
pymdownx.tabbed:
|
|
47
|
+
alternate_style: true
|
|
48
|
+
plugins:
|
|
49
|
+
llmstxt:
|
|
50
|
+
sections:
|
|
51
|
+
Documentation: ["*.md"]
|
|
52
|
+
search: {}
|
|
53
|
+
mkdocstrings:
|
|
54
|
+
handlers:
|
|
55
|
+
python:
|
|
56
|
+
options:
|
|
57
|
+
docstring_style: google
|
|
58
|
+
members_order: alphabetical
|
|
59
|
+
filters: ["!^_"]
|
|
60
|
+
show_signature_annotations: true
|
|
61
|
+
separate_signature: true
|
|
62
|
+
signature_crossrefs: true
|
|
63
|
+
line_length: 76
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": {
|
|
3
|
+
".relcon-docs/base.yml": "eb61dfb9f26a4e4d998f0abed883fbd7ce8abf12d531fa16135df825adae39c9",
|
|
4
|
+
"docs/javascripts/relcon-docs-math.js": "b8e7b15f419f4e52083570122f537ea7036bb529256d7f172aae51449d523661",
|
|
5
|
+
"docs/stylesheets/relcon-docs.css": "afbc6ba90ad4e80e9d79bdd89a4a825ac2ff62af4c213d228f678be87c810a85"
|
|
6
|
+
},
|
|
7
|
+
"package_version": "0.1.0",
|
|
8
|
+
"schema": 1
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Working on relcon-docs
|
|
2
|
+
|
|
3
|
+
Keep this package independent of BONDI and Yanex. Shared documentation configuration
|
|
4
|
+
and assets belong here; project content and research code do not.
|
|
5
|
+
|
|
6
|
+
Preserve ordinary Zensical build and serve commands. Configuration updates are explicit.
|
|
7
|
+
Never overwrite project-owned configuration. Treat managed-file conflicts as errors
|
|
8
|
+
unless the caller explicitly requests force.
|
|
9
|
+
|
|
10
|
+
Use uv, pytest and Ruff. Test configuration updates, conflicts, installed assets and
|
|
11
|
+
strict documentation builds. Record user-facing changes under Unreleased.
|
|
12
|
+
Work on codex/ branches and leave commits for review; do not merge without approval.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.1.0 — 2026-11-15
|
|
6
|
+
|
|
7
|
+
- Enable heading permalinks with the paragraph symbol and descriptive link titles.
|
|
8
|
+
|
|
9
|
+
- Sort API members alphabetically and exclude underscore-prefixed members by default.
|
|
10
|
+
|
|
11
|
+
- Publish the self-hosted documentation showcase with Markdown, diagrams, equations
|
|
12
|
+
and figures; use the reusable deployment workflow on main and manual runs.
|
|
13
|
+
- Add shared on-demand MathJax rendering and dark-theme Markdown-copy controls.
|
|
14
|
+
|
|
15
|
+
- Add paired accent fill, border and text colours for highlighting diagram boxes,
|
|
16
|
+
with a light/dark example on the diagram-colours page.
|
|
17
|
+
|
|
18
|
+
- Share accessible light/dark diagram colours for flowcharts and sequence roles,
|
|
19
|
+
with CSS properties for custom diagrams and legacy variable aliases.
|
|
20
|
+
|
|
21
|
+
- Enable callouts, collapsible notes and Mermaid diagrams in shared defaults.
|
|
22
|
+
|
|
23
|
+
- Enable Markdown exports and llms.txt in shared defaults for new and existing
|
|
24
|
+
projects, without requiring local plugin configuration.
|
|
25
|
+
|
|
26
|
+
- Add a reusable GitHub Pages deployment workflow with caller-owned triggers.
|
|
27
|
+
- Create a manual-only starter docs.yml on configuration when absent; preserve
|
|
28
|
+
existing workflow contents, even with --force.
|
|
29
|
+
|
|
30
|
+
- Add packaged Zensical defaults and copy-button styling.
|
|
31
|
+
- Add explicit configuration, dry-run diffs, CI checks and managed-file conflict detection.
|
|
32
|
+
- Preserve project-owned YAML and support ordinary Zensical builds and previews.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Relaxed Constraints
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: relcon-docs
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Shared documentation defaults, styling, and configuration tools for Zensical
|
|
5
|
+
Project-URL: Homepage, https://relaxed-constraints.github.io/relcon-docs/
|
|
6
|
+
Project-URL: Repository, https://github.com/relaxed-constraints/relcon-docs
|
|
7
|
+
Project-URL: Issues, https://github.com/relaxed-constraints/relcon-docs/issues
|
|
8
|
+
Author: Relaxed Constraints
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: mkdocstrings-python>=2.0.10
|
|
13
|
+
Requires-Dist: pyyaml<7,>=6
|
|
14
|
+
Requires-Dist: ruff>=0.9
|
|
15
|
+
Requires-Dist: zensical<0.2,>=0.1.1
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# relcon-docs
|
|
19
|
+
|
|
20
|
+
Shared documentation defaults, styling, and configuration tools for Relaxed Constraints
|
|
21
|
+
projects using Zensical.
|
|
22
|
+
|
|
23
|
+
Install this package as a **documentation dependency**. It supplies Zensical, the
|
|
24
|
+
Python API handler and formatter, shared modern-theme settings, and copy-button CSS.
|
|
25
|
+
It has no dependency on BONDI or Yanex.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
uv add --group docs relcon-docs
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or install with `python -m pip install relcon-docs`. Keep uv.lock committed for
|
|
34
|
+
reproducible builds. Upgrade with `uv lock --upgrade-package relcon-docs`, sync
|
|
35
|
+
the docs group, and run `relcon-docs configure` to refresh shared assets.
|
|
36
|
+
|
|
37
|
+
## Configure a project
|
|
38
|
+
|
|
39
|
+
Once installed in your project's environment:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
relcon-docs configure --dry-run
|
|
43
|
+
relcon-docs configure
|
|
44
|
+
zensical serve
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The project directory must already exist. A fresh project gets a minimal
|
|
48
|
+
`mkdocs.yml`; add your Markdown pages under `docs/` and edit navigation as needed.
|
|
49
|
+
The starter uses a localhost `site_url` for previews. Replace it with the published
|
|
50
|
+
site URL before deployment; Markdown exports require this setting.
|
|
51
|
+
For an existing YAML project, add `INHERIT: .relcon-docs/base.yml` first.
|
|
52
|
+
Convert and remove any `zensical.toml` before configuring: Zensical prefers it over YAML.
|
|
53
|
+
|
|
54
|
+
| File | Owner |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `.github/workflows/docs.yml` | Project: deployment triggers and reusable workflow revision |
|
|
57
|
+
| `mkdocs.yml` | Project: metadata, navigation, API paths, Markdown-export sections and overrides |
|
|
58
|
+
| `.relcon-docs/base.yml` | Package: theme, Markdown extensions and API-rendering defaults |
|
|
59
|
+
| `docs/stylesheets/relcon-docs.css` | Package: copy buttons, diagrams and figures |
|
|
60
|
+
| `docs/javascripts/relcon-docs-math.js` | Package: on-demand MathJax rendering |
|
|
61
|
+
| `.relcon-docs/state.json` | Tool: applied version and hashes for detecting manual edits |
|
|
62
|
+
|
|
63
|
+
Commit these files. Configuration is explicit: installing or upgrading the
|
|
64
|
+
dependency never rewrites project files. Builds and previews use ordinary
|
|
65
|
+
`zensical` commands, without a wrapper or sibling checkout.
|
|
66
|
+
|
|
67
|
+
## Upgrade and review
|
|
68
|
+
|
|
69
|
+
Upgrade the dependency and lockfile, then run:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
relcon-docs configure --dry-run
|
|
73
|
+
relcon-docs configure
|
|
74
|
+
zensical build --strict
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Unmodified managed files are updated. A changed or deleted managed file produces a
|
|
78
|
+
conflict and **no files are written**. On first adoption, an existing managed path
|
|
79
|
+
with different contents also conflicts. Identical contents can be adopted safely.
|
|
80
|
+
|
|
81
|
+
Move customizations into project overrides or a separate stylesheet. To explicitly
|
|
82
|
+
replace conflicting managed files, use `configure --force`; inspect the proposed
|
|
83
|
+
changes first with `configure --dry-run --force`. Force never rewrites an existing
|
|
84
|
+
`mkdocs.yml` or `.github/workflows/docs.yml`. Invalid state files must be restored from Git; force does not bypass
|
|
85
|
+
state validation or symlink protection.
|
|
86
|
+
|
|
87
|
+
Each file replacement is atomic; the full set is not a filesystem transaction.
|
|
88
|
+
State is written last, and an interrupted run can be retried.
|
|
89
|
+
|
|
90
|
+
## Project overrides
|
|
91
|
+
|
|
92
|
+
Mappings merge recursively. Lists replace inherited lists, so repeat the shared
|
|
93
|
+
entries when overriding `theme.features` or `extra_css`. Use mapping syntax for
|
|
94
|
+
plugins and Markdown extensions to preserve unrelated inherited defaults:
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
INHERIT: .relcon-docs/base.yml
|
|
98
|
+
site_name: My research project
|
|
99
|
+
site_url: https://example.org/my-project/
|
|
100
|
+
plugins:
|
|
101
|
+
mkdocstrings:
|
|
102
|
+
handlers:
|
|
103
|
+
python:
|
|
104
|
+
paths: [src]
|
|
105
|
+
llmstxt:
|
|
106
|
+
sections:
|
|
107
|
+
Documentation: ["*.md"]
|
|
108
|
+
API reference: ["reference/**/*.md"]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Markdown exports and `llms.txt` are enabled in the shared defaults for all
|
|
112
|
+
Markdown pages, including nested pages. Existing projects inherit them without
|
|
113
|
+
adding a local plugin configuration. A valid project `site_url` is required.
|
|
114
|
+
|
|
115
|
+
The shared index uses a `Documentation` section. Section mappings merge during
|
|
116
|
+
inheritance: override `Documentation` to change its page patterns; adding a
|
|
117
|
+
different section name retains the inherited section too. Most projects can omit
|
|
118
|
+
`llmstxt` entirely. Set `plugins.llmstxt.enabled: false` to opt out.
|
|
119
|
+
|
|
120
|
+
This first version supports the standard `docs/` source directory and direct
|
|
121
|
+
inheritance from `.relcon-docs/base.yml`. It does not migrate arbitrary configurations,
|
|
122
|
+
prune old stylesheets, or modify existing workflow files.
|
|
123
|
+
|
|
124
|
+
## Callouts, collapsible notes and diagrams
|
|
125
|
+
|
|
126
|
+
Shared defaults enable `admonition`, `pymdownx.details` and Mermaid fenced
|
|
127
|
+
blocks. Projects do not need local extension configuration for these features.
|
|
128
|
+
For example:
|
|
129
|
+
|
|
130
|
+
````markdown
|
|
131
|
+
!!! note "Research note"
|
|
132
|
+
|
|
133
|
+
Record assumptions beside your results.
|
|
134
|
+
|
|
135
|
+
??? tip "Show details"
|
|
136
|
+
|
|
137
|
+
Put optional explanations here.
|
|
138
|
+
|
|
139
|
+
```mermaid
|
|
140
|
+
graph LR
|
|
141
|
+
Data --> Experiment --> Results
|
|
142
|
+
```
|
|
143
|
+
````
|
|
144
|
+
|
|
145
|
+
Zensical initializes Mermaid on pages containing diagrams. Shared light/dark colours apply to standard flowchart nodes, labels and connectors,
|
|
146
|
+
and sequence actors, messages and notes. Custom diagrams can use the
|
|
147
|
+
`--relcon-diagram-*` CSS properties; legacy `--jb-*` aliases remain supported.
|
|
148
|
+
See the [diagram examples](https://relaxed-constraints.github.io/relcon-docs/diagrams/).
|
|
149
|
+
Project-specific overrides can remain in a separate local stylesheet.
|
|
150
|
+
If overriding `custom_fences`, include the Mermaid entry too: lists replace
|
|
151
|
+
inherited lists.
|
|
152
|
+
|
|
153
|
+
## GitHub Pages deployment
|
|
154
|
+
|
|
155
|
+
`configure` creates `.github/workflows/docs.yml` **only when absent**. The starter
|
|
156
|
+
enables manual deployment (`workflow_dispatch`) and includes commented examples
|
|
157
|
+
for pushes to `main` and published releases. After creation the file belongs to the
|
|
158
|
+
project: rerunning configure, including with `--force`, leaves it byte-for-byte
|
|
159
|
+
unchanged. It is not included in the managed-file hashes. A missing starter is
|
|
160
|
+
reported by `--check` and shown by `--dry-run`; ordinary configure recreates it.
|
|
161
|
+
|
|
162
|
+
The starter calls the shared
|
|
163
|
+
[`deploy-docs.yml`](https://github.com/relaxed-constraints/relcon-docs/blob/main/.github/workflows/deploy-docs.yml)
|
|
164
|
+
workflow. It checks out the **caller repository and triggering revision**, installs
|
|
165
|
+
its locked `docs` dependency group, checks managed configuration, runs a strict
|
|
166
|
+
Zensical build, uploads `site/`, and deploys it to GitHub Pages. It does not update
|
|
167
|
+
configuration during deployment.
|
|
168
|
+
|
|
169
|
+
Choose the project's policy by editing the starter's `on` mapping. For BONDI,
|
|
170
|
+
keep automatic deployment limited to published releases:
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
on:
|
|
174
|
+
workflow_dispatch:
|
|
175
|
+
release:
|
|
176
|
+
types: [published]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
A consumer project can instead publish on each push to `main`:
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
on:
|
|
183
|
+
workflow_dispatch:
|
|
184
|
+
push:
|
|
185
|
+
branches: [main]
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
The caller grants `contents: read`, `pages: write` and `id-token: write`.
|
|
189
|
+
The build job uses read-only repository access; the deployment job gets Pages
|
|
190
|
+
permissions and uses the `github-pages` environment. Deployments share a concurrency
|
|
191
|
+
group and do not cancel an in-progress deployment.
|
|
192
|
+
|
|
193
|
+
### Repository setup and workflow updates
|
|
194
|
+
|
|
195
|
+
- Set **Settings → Pages → Source → GitHub Actions** once in each repository.
|
|
196
|
+
- Set the project's `site_url` to its published URL before deploying.
|
|
197
|
+
- Commit `uv.lock`, provide a `docs` dependency group, and use the standard
|
|
198
|
+
`docs/` source and `site/` output directories.
|
|
199
|
+
- For release deployment, allow the release tags under the `github-pages`
|
|
200
|
+
environment's deployment protection rules.
|
|
201
|
+
- When an existing deployment workflow uses another name (such as `pages.yml`),
|
|
202
|
+
consolidate it with the starter before enabling automatic triggers. Configure
|
|
203
|
+
does not remove or alter other workflows.
|
|
204
|
+
|
|
205
|
+
The starter references `@main`; use a reviewed full commit SHA for reproducible
|
|
206
|
+
deployment tooling. No `v1` tag is assumed. The workflow revision and Python package
|
|
207
|
+
dependency are independent: upgrading the package never rewrites the caller's
|
|
208
|
+
workflow reference or triggers.
|
|
209
|
+
|
|
210
|
+
Optional caller job inputs are `python-version` (default `"3.11"`) and
|
|
211
|
+
`uv-version` (default `"0.13.6"`). For example:
|
|
212
|
+
|
|
213
|
+
```yaml
|
|
214
|
+
jobs:
|
|
215
|
+
docs:
|
|
216
|
+
uses: relaxed-constraints/relcon-docs/.github/workflows/deploy-docs.yml@main
|
|
217
|
+
with:
|
|
218
|
+
python-version: "3.12"
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## CLI reference
|
|
222
|
+
|
|
223
|
+
`relcon-docs configure [--project PATH] [--dry-run | --check] [--force]`
|
|
224
|
+
|
|
225
|
+
- `--project`: target an existing project root; defaults to the working directory.
|
|
226
|
+
- `--dry-run`: print proposed file diffs without writing. Conflicts still fail unless forced.
|
|
227
|
+
- `--check`: write nothing; exit 0 when current, 1 for pending updates, 2 for errors/conflicts.
|
|
228
|
+
- `--force`: explicitly replace conflicting managed files; incompatible with `--check`.
|
|
229
|
+
- `relcon-docs --version`: display the installed package version.
|
|
230
|
+
|
|
231
|
+
Use `relcon-docs configure --check` in CI before `zensical build --strict`.
|
|
232
|
+
|
|
233
|
+
## Development
|
|
234
|
+
|
|
235
|
+
```sh
|
|
236
|
+
uv sync --locked
|
|
237
|
+
uv run pytest
|
|
238
|
+
uv run ruff check .
|
|
239
|
+
uv run ruff format --check .
|
|
240
|
+
uv run relcon-docs configure --check
|
|
241
|
+
uv run zensical build --strict
|
|
242
|
+
uv build
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
For a local consumer trial before publishing, install the built wheel in an isolated
|
|
246
|
+
environment. The installed package contains all assets; consumers need no checkout
|
|
247
|
+
of this repository.
|
|
248
|
+
|
|
249
|
+
## Feature examples
|
|
250
|
+
|
|
251
|
+
The documentation includes walkthroughs for Markdown, Mermaid diagrams, equations
|
|
252
|
+
and figures. Equations use the shared Arithmatex configuration and a pinned
|
|
253
|
+
MathJax renderer loaded from jsDelivr only on pages containing mathematics.
|
|
254
|
+
The site itself uses relcon-docs and its reusable deployment workflow.
|
|
255
|
+
|
|
256
|
+
### API member defaults
|
|
257
|
+
|
|
258
|
+
API members are ordered alphabetically. Members whose names start with `_` are
|
|
259
|
+
excluded from automatic member listings, including double-underscore names.
|
|
260
|
+
Projects can override `members_order` and `filters` under
|
|
261
|
+
`plugins.mkdocstrings.handlers.python.options` in `mkdocs.yml`, or on an
|
|
262
|
+
individual API directive when a specific private or special method needs documenting.
|