Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f0723d2
Simplify vale binary install (#375)
rkratky Apr 15, 2025
3eadb71
Suggest (#376)
waveform80 Apr 28, 2025
d7f6272
Fix: Update related links header in MyST and RST style guides (#382)
tang-mm Apr 28, 2025
9fc415a
Doc: add instructions for configuring PDF output (#381)
tang-mm Apr 29, 2025
74fd005
improve update logic (#386)
akcano May 28, 2025
2a63a57
Update and rename README.rst to README.md (#387)
a-velasco May 29, 2025
a6a3445
Switch the recommendation to Sphinx design tabs (#383)
msuchane Jun 2, 2025
6abac30
feat: adds sphinx sitemap support (#389)
SecondSkoll Jun 5, 2025
fb5c998
fix: RTD versioned sitemaps (#392)
SecondSkoll Jun 5, 2025
a489ae0
fix: sitemap (#393)
SecondSkoll Jun 5, 2025
1aca072
fix: doc link
SecondSkoll Jun 5, 2025
5db6fb1
fix: remove outdated comment from conf.py
SecondSkoll Jun 5, 2025
2549b8d
docs: Clarify instructions for sitemaps (#395)
s-makin Jun 10, 2025
4ad3e70
docs: add guidance about `dirhtml` for sitemaps (#399)
medubelko Jun 10, 2025
c650eb0
conf: drop spurious `ast` import (#398)
Saviq Jun 12, 2025
c1fb38e
fix: branch name in update script (#397)
dwilding Jun 16, 2025
0919cdf
fix: remove references to obsolete content directory under docs (#400)
tang-mm Jun 16, 2025
1476857
docs: clarify instructions for initial setup guide (#401)
tang-mm Jun 16, 2025
f08bb74
docs: add lastmod configuration for sphinx-sitemap (#404)
SecondSkoll Jun 23, 2025
c8d0d75
Add GitHub workflow for checking Contributor Licence Agreement (#403)
tang-mm Jun 24, 2025
13d18ab
feat: Optimize the Makefile (#388)
JordanMG13 Jul 8, 2025
9dcf272
feat: improve markdown linting workflow (#379)
st3v3nmw Jul 8, 2025
e5b6360
feat: Python3 venv detection (#384)
simondeziel Jul 8, 2025
5aa830f
refactor: reference an existing variable (#409)
network-charles Jul 9, 2025
bec44cc
docs: improve header customisation instructions (#406)
Jul 16, 2025
5f079f9
Remove confusing statement on sitemap config (#414)
rkratky Jul 16, 2025
6ca9336
Update set-up-automated-testing.rst (#415)
erinecon Jul 21, 2025
c65772d
1.2.0 release, tidy, and change to vale for spelling (#410)
SecondSkoll Jul 25, 2025
2ad0cc1
Update woke prereqs in automatic checks doc (#416)
AshleyCliff Jul 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/check-removed-urls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Check for removed URLs

on:
pull_request:
branches: [main]

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
path: compare
- name: Checkout base branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
repository: ${{ github.event.pull_request.base.repo.full_name }}
fetch-depth: 0
path: base
- uses: actions/setup-python@v5
- name: Build docs
run: |
for dir in compare base; do
pushd ${dir}/docs
make install
. .sphinx/venv/bin/activate
make html
popd
done
- name: Generate current URLs list
run: |
for dir in compare base; do
pushd ${dir}/docs
find ./_build/ -name '*.html' \
| sed 's|/_build||;s|/index.html$|/|;s|.html$||' \
| sort > urls.txt
popd
done
- name: Compare URLs
run: |
BASE_URLS_PATH="base/docs/urls.txt"
COMPARE_URLS_PATH="compare/docs/urls.txt"
removed=$(comm -23 ${BASE_URLS_PATH} ${COMPARE_URLS_PATH} )
if [ -n "$removed" ]; then
echo "The following URLs were removed:"
echo "$removed"
echo "Please ensure removed pages are redirected"
exit 1
fi
10 changes: 10 additions & 0 deletions .github/workflows/cla-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This workflow checks if the contributor has signed the Canonical Contributor Licence Agreement (CLA)
name: Canonical Contributor Licence Agreement check
on: [pull_request]

jobs:
cla-check:
runs-on: ubuntu-latest
steps:
- name: Check if CLA signed
uses: canonical/has-signed-canonical-cla@v2
9 changes: 6 additions & 3 deletions .github/workflows/markdown-style-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DavidAnson/markdownlint-cli2-action@v16
with:
config: "docs/.sphinx/.markdownlint.json"
- name: Create venv
working-directory: "docs"
run: make install
- name: Lint markdown
working-directory: "docs"
run: make lint-md
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# sphinx-docs-starter-pack changelog

## 1.2.0

* Replaces spelling check with Vale.
* Fixes the Markdown linting GitHub action and adds a `make lint-md` check.
* Fixes the download branch name in the update script.
* Adds a check for removed URLs.

### Added

* `docs/.sphinx/.pymarkdown.json` [#379](https://github.com/canonical/sphinx-docs-starter-pack/pull/379)
* `.github/workflows/check-removed-urls.yml` [#410](https://github.com/canonical/sphinx-docs-starter-pack/pull/410)

### Changed

* `docs/.sphinx/update_sp.py` [#397](https://github.com/canonical/sphinx-docs-starter-pack/pull/397) [#410](https://github.com/canonical/sphinx-docs-starter-pack/pull/410)
* `.github/workflows/markdown-style-checks.yml` [#379](https://github.com/canonical/sphinx-docs-starter-pack/pull/379)
* `docs/Makefile` [#379](https://github.com/canonical/sphinx-docs-starter-pack/pull/379) [#410](https://github.com/canonical/sphinx-docs-starter-pack/pull/410)
* `docs/requirements.txt` [#410](https://github.com/canonical/sphinx-docs-starter-pack/pull/410)
* `docs/.sphinx/get_vale_conf.py` [#410](https://github.com/canonical/sphinx-docs-starter-pack/pull/410)

### Removed

* `docs/.sphinx/.markdownlint.json` [#379](https://github.com/canonical/sphinx-docs-starter-pack/pull/379)
* `docs/.sphinx/.wordlist.txt` [#410](https://github.com/canonical/sphinx-docs-starter-pack/pull/410)
* `docs/.sphinx/spellingcheck.yaml` [#410](https://github.com/canonical/sphinx-docs-starter-pack/pull/410)


## 1.1.0

* Adds sitemap support.
* Simplifies vale binary download & install.
* Leaves vale install output in STDOUT to reveal potential problems.
* Improves update logic.
* Update Makefile logic

### Changed

* `docs/conf.py` [#389](https://github.com/canonical/sphinx-docs-starter-pack/pull/389)
* `docs/requirements.txt`(https://github.com/canonical/sphinx-docs-starter-pack/pull/389)

## 1.0.1

Fixes an issue with Vale implementation, and adds words to main wordlist.
Expand Down
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Canonical's Sphinx Starter Pack

*A pre-configured repository to build and publish documentation with Sphinx.*

## Description

The Documentation starter pack includes:

* A bundled [Sphinx] theme, configuration, and extensions
* Support for both reStructuredText (reST) and MyST Markdown
* Build checks for links, spelling, and inclusive language
* Customisation support layered over a core configuration

See the full documentation: https://canonical-starter-pack.readthedocs-hosted.com/

## Structure

This section outlines the structure of this repository, and some key files.

### `docs/`

This directory contains the documentation for the starter pack itself.

To view it in your browser, navigate to this directory and type `make run`.

### `.github/workflows/`

This directory contains files used for documentation build checks via GitHub's CI.

The file `test-starter-pack.yml` tests the functionality of the starter pack project.

## Contributing

We welcome contributions to this project! If you have suggestions, bug fixes, or improvements, please open an issue or submit a pull request.

Please read and sign our [Contributor Licence Agreement (CLA)] before submitting any changes. The agreement grants Canonical permission to use your contributions. The author of a change remains the copyright owner of their code (no copyright assignment occurs).

<!--Links-->

[Sphinx]: https://www.sphinx-doc.org/
[Contributor Licence Agreement (CLA)]: https://ubuntu.com/legal/contributors
37 changes: 0 additions & 37 deletions README.rst

This file was deleted.

38 changes: 34 additions & 4 deletions docs/.custom_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,55 @@ github
GPG
gyre
https
html
io
Intersphinx
lang
LaTeX
latexmk
Multipass
otf
plantuml
PNG
Pygments
pymarkdown
QEMU
Rockcraft
readthedocs
rst
sitemapindex
subproject
subprojects
SVG
tex
texlive
TOC
toctree
txt
uncommenting
utils
VMs
WCAG
whitespace
whitespaces
wordlist
xetex
xindy
kustom
VMs
wordlist
txt
xml
ip
spread_test_example
Furo
PDF
Open Graph
MyST
YouTube
reStructuredText
GitHub
Sphinx
URL
PR
Read the Docs
Spread
landscape
lastmod
yaml
21 changes: 0 additions & 21 deletions docs/.sphinx/.markdownlint.json

This file was deleted.

46 changes: 46 additions & 0 deletions docs/.sphinx/.pymarkdown.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"plugins": {
"selectively_enable_rules": true,
"heading-style": {
"enabled": true,
"style": "atx"
},
"commands-show-output": {
"enabled": true
},
"no-missing-space-atx": {
"enabled": true
},
"blanks-around-headings": {
"enabled": true
},
"heading-start-left": {
"enabled": true
},
"no-trailing-punctuation": {
"enabled": true,
"punctuation": ".,;。,;"
},
"blanks-around-fences": {
"enabled": true,
"list_items": false
},
"blanks-around-lists": {
"enabled": true
},
"hr-style": {
"enabled": true
},
"no-empty-links": {
"enabled": true
},
"no-alt-text": {
"enabled": true
}
},
"extensions": {
"front-matter" : {
"enabled" : true
}
}
}
Loading
Loading