diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 95449d4..6bfc2a8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -56,6 +56,12 @@ jobs: - name: Build site run: pipx run nox -s docs + env: + # Sumi's `repo_stars` reads the repository's star count from the + # GitHub API at build time. The token keeps that lookup clear of the + # anonymous rate limit runners can share; without it the build still + # passes and the header shows the plain GitHub icon. + GITHUB_TOKEN: ${{ github.token }} - name: Upload site as pages artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 diff --git a/docs/requirements.txt b/docs/requirements.txt index a0db418..dbeb565 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,5 +3,5 @@ # depends on, and Sumi, its documentation theme. Sumi brings its own blog, # search palette and fonts, so nothing else is needed. mkdocs-ng==1.11.0 -mkdocs-sumi==0.4.1 +mkdocs-sumi==0.4.3 pymdown-extensions==12.3 diff --git a/mkdocs.yml b/mkdocs.yml index 5a15a30..f3832ad 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -44,6 +44,22 @@ theme: navigation_tabs: false # The preview image for pages that do not set their own `image:`. social_image: assets/social.png + # Links beside the brand and a button at the end of the header. A link is + # highlighted on the pages whose URL starts with its path or one of its + # `match` prefixes; Pricing points into the homepage, so it never is. + header_links: + - text: Docs + link: getting-started.md + match: [guides/, configuration/, example/, troubleshoot/, migration/, compare/] + - {text: Rules, link: rules.md} + - {text: Pricing, link: "index.md#pricing"} + - {text: Blog, link: blog/} + - {text: Changelog, link: changelog.md} + header_button: + text: Install App + link: https://github.com/apps/commit-check + # The repository's star count on its icon, read from GitHub at build time. + repo_stars: true extra_css: # Brand colours and typography. The landing page adds its own layout in