diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index ed9f08f..64e7ba4 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -1,6 +1,6 @@ # A D-Modem repository's GitHub Pages site: the shared theme and settings # (pages/, tools/site.sh) around the repository's mkdocs.yml and docs/, built -# with mkdocs build --strict, then deployed to d-modem.github.io//. +# with Zensical (zensical build --strict), then deployed to d-modem.github.io//. # # Called from each repository's .github/workflows/pages.yml: # @@ -67,9 +67,7 @@ jobs: - run: .site/brand/tools/site.sh . prepare - if: inputs.prepare != '' run: ${{ inputs.prepare }} - - run: mkdocs build --strict - env: - NO_MKDOCS_2_WARNING: "1" + - run: zensical build --strict - uses: actions/upload-pages-artifact@v5 with: path: site diff --git a/docs/sites.md b/docs/sites.md index e236a58..87e0657 100644 --- a/docs/sites.md +++ b/docs/sites.md @@ -3,15 +3,14 @@ Each repository has a site at `https://d-modem.github.io//`, and the suite has one at (the [D-Modem.github.io](https://github.com/D-Modem/D-Modem.github.io) -repository). They are [MkDocs](https://www.mkdocs.org/) sites with the -[Material](https://squidfunk.github.io/mkdocs-material/) theme, and they all -share what lives here: +repository). They are built with [Zensical](https://zensical.org/), the successor to +Material for MkDocs by the same team, and they all share what lives here: | Path | What it is | | --- | --- | -| `pages/mkdocs-base.yml` | The shared settings: the theme, light and dark schemes, Markdown extensions, search | +| `pages/mkdocs-base.yml` | The shared settings: the theme, light and dark schemes, Markdown extensions, search (in `mkdocs.yml`'s format, which Zensical reads) | | `pages/theme/` | The theme's overrides: the suite's bar across the top, the Rainbow Book accent, the mark as logo and favicon | -| `pages/requirements.txt` | The pinned MkDocs and Material versions | +| `pages/requirements.txt` | The pinned Zensical version | | `tools/site.sh` | Puts the above into a repository and builds or previews its site | | `.github/workflows/site.yml` | The reusable workflow that builds every site and deploys it to Pages | diff --git a/pages/mkdocs-base.yml b/pages/mkdocs-base.yml index 6764e93..bed964d 100644 --- a/pages/mkdocs-base.yml +++ b/pages/mkdocs-base.yml @@ -1,4 +1,5 @@ -# The D-Modem sites' shared MkDocs settings. A repository's mkdocs.yml starts +# The D-Modem sites' shared settings, for Zensical (which reads MkDocs' +# mkdocs.yml format). A repository's mkdocs.yml starts # with "INHERIT: .site/mkdocs-base.yml" (tools/site.sh puts this file and the # theme in .site/) and adds its site_name, site_url, repo_url, nav and # extra.repo (its name, which picks its Rainbow Book colour). diff --git a/pages/requirements.txt b/pages/requirements.txt index 5f12aa9..bb2c56e 100644 --- a/pages/requirements.txt +++ b/pages/requirements.txt @@ -1,3 +1,2 @@ # the sites' build (tools/site.sh, .github/workflows/site.yml) -mkdocs==1.6.1 -mkdocs-material==9.8.0 +zensical==0.1.0 diff --git a/pages/theme/assets/suite/d-modem.css b/pages/theme/assets/suite/d-modem.css index c52278f..0b3382f 100644 --- a/pages/theme/assets/suite/d-modem.css +++ b/pages/theme/assets/suite/d-modem.css @@ -1,5 +1,5 @@ /* The D-Modem sites: brand's neutrals and type, the repository's Rainbow Book - (--suite-accent, set in main.html) as Material's primary and accent. */ + (--suite-accent, set in main.html) as the theme's primary and accent. */ @font-face { font-family: "Sauce Code Pro"; src: local("SauceCodePro Nerd Font Mono"), local("SauceCodePro Nerd Font"), local("Source Code Pro"); diff --git a/pages/theme/main.html b/pages/theme/main.html index 2746835..33ba1df 100644 --- a/pages/theme/main.html +++ b/pages/theme/main.html @@ -1,4 +1,4 @@ -{#- The D-Modem sites' theme: Material with the suite's bar on top and the +{#- The D-Modem sites' theme: Zensical's with the suite's bar on top and the repository's Rainbow Book as its accent (extra.repo in mkdocs.yml). -#} {% extends "base.html" %} @@ -8,7 +8,7 @@ "menu": "#3ddc84", "bbs": "#3d8bff", "go3270": "#a66bff", "brand": "#f2f4fa", "D-Modem.github.io": "#3dff9a" } -%} - + {{ super() }} {% endblock %} diff --git a/tools/site.sh b/tools/site.sh index f8cf3f6..50bf7b2 100755 --- a/tools/site.sh +++ b/tools/site.sh @@ -5,11 +5,10 @@ # # prepare puts the shared theme and settings in REPO_DIR/.site/ (the repo's # mkdocs.yml starts with "INHERIT: .site/mkdocs-base.yml"); build then runs -# mkdocs build --strict into REPO_DIR/site/, serve a live preview on +# zensical build --strict into REPO_DIR/site/, serve a live preview on # http://127.0.0.1:8000/. Needs pages/requirements.txt installed # (pip install -r pages/requirements.txt). set -eu -export NO_MKDOCS_2_WARNING=1 brand=$(cd "$(dirname "$0")/.." && pwd) repo=${1:?usage: tools/site.sh REPO_DIR [build|serve|prepare]} what=${2:-build} @@ -21,7 +20,7 @@ cp "$brand/pages/mkdocs-base.yml" .site/mkdocs-base.yml cp "$brand/avatar/mark.svg" .site/theme/assets/suite/mark.svg case $what in prepare) ;; -build) mkdocs build --strict ;; -serve) mkdocs serve ;; +build) zensical build --strict ;; +serve) zensical serve ;; *) echo "tools/site.sh: $what: build, serve or prepare" >&2; exit 2 ;; esac