Skip to content

Commit

Permalink
docs: update sphinx theme (#4367)
Browse files Browse the repository at this point in the history
Signed-off-by: Callahan Kovacs <[email protected]>
Co-authored-by: David Boddie <[email protected]>
Co-authored-by: Callahan Kovacs <[email protected]>
Co-authored-by: Alex Lowe <[email protected]>
  • Loading branch information
4 people authored Sep 22, 2023
1 parent e340be1 commit aa64666
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 242 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "tests/spread/tools/snapd-testing-tools"]
path = tests/spread/tools/snapd-testing-tools
url = https://github.com/snapcore/snapd-testing-tools.git
[submodule "docs/sphinx-resources"]
path = docs/sphinx-resources
url = https://github.com/canonical/sphinx-docs-starter-pack.git
6 changes: 5 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
---
version: 2

submodules:
include:
- docs/sphinx-resources

build:
os: ubuntu-22.04
tools:
Expand All @@ -19,5 +23,5 @@ sphinx:

python:
install:
- requirements: docs/.sphinx/requirements.txt
- requirements: docs/requirements.txt
- requirements: docs/sphinx-resources/.sphinx/requirements.txt
170 changes: 0 additions & 170 deletions docs/.sphinx/_static/custom.css

This file was deleted.

10 changes: 0 additions & 10 deletions docs/.sphinx/requirements.txt

This file was deleted.

24 changes: 0 additions & 24 deletions docs/.sphinx/spellingcheck.yaml

This file was deleted.

27 changes: 19 additions & 8 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXOPTS ?= -q
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
VENV = .sphinx/venv/bin/activate
VENV = sphinx-resources/.sphinx/venv/bin/activate


# Put it first so that "make" without argument is like "make help".
Expand All @@ -16,8 +16,8 @@ help:

install:
@echo "... setting up virtualenv"
python3 -m venv .sphinx/venv
. $(VENV); pip install --upgrade -r .sphinx/requirements.txt -r requirements.txt
python3 -m venv sphinx-resources/.sphinx/venv
. $(VENV); pip install --upgrade -r sphinx-resources/.sphinx/requirements.txt -r requirements.txt

@echo "\n" \
"--------------------------------------------------------------- \n" \
Expand All @@ -27,25 +27,36 @@ install:
"* clean built doc files: make clean-doc \n" \
"* clean full environment: make clean \n" \
"* check spelling: make spelling \n" \
"* check inclusive language: make woke \n" \
"--------------------------------------------------------------- \n"
run:
. $(VENV); sphinx-autobuild -c . "$(SOURCEDIR)" "$(BUILDDIR)"
. $(VENV); sphinx-autobuild -c . -b html "$(SOURCEDIR)" "$(BUILDDIR)"

html:
. $(VENV); $(SPHINXBUILD) -c . "$(SOURCEDIR)" "$(BUILDDIR)" -w .sphinx/warnings.txt
. $(VENV); $(SPHINXBUILD) -c . -b html "$(SOURCEDIR)" "$(BUILDDIR)" -w sphinx-resources/.sphinx/warnings.txt

epub:
. $(VENV); $(SPHINXBUILD) -c . -b epub "$(SOURCEDIR)" "$(BUILDDIR)" -w sphinx-resources/.sphinx/warnings.txt

serve:
cd "$(BUILDDIR)"; python3 -m http.server 8000

clean: clean-doc
rm -rf .sphinx/venv
rm -rf reference/commands
rm -rf sphinx-resources/.sphinx/venv

clean-doc:
git clean -fx "$(BUILDDIR)"

spelling: html
. $(VENV) ; python3 -m pyspelling -c .sphinx/spellingcheck.yaml
. $(VENV) ; python3 -m pyspelling -c sphinx-resources/.sphinx/spellingcheck.yaml

linkcheck:
. $(VENV) ; $(SPHINXBUILD) -c . -b linkcheck "$(SOURCEDIR)" "$(BUILDDIR)"

woke:
type woke >/dev/null 2>&1 || { snap install woke; exit 1; }
woke *.rst **/*.rst -c https://github.com/canonical-web-and-design/Inclusive-naming/raw/main/config.yml

.PHONY: help Makefile

Expand Down
Loading

0 comments on commit aa64666

Please sign in to comment.