Skip to content

Commit

Permalink
refactor: removes files now provided in canonical-sphinx==0.3.0 (#318)
Browse files Browse the repository at this point in the history
* fix: moves gitignore to root

* feat: removes latex config after canonical-sphinx version change

* fix: use pypi version of canonical-sphinx

* fix: removes font files as they are included in canonical-sphinx 0.3.0

* fix: removes static and template files as they are included in canonical-sphinx 0.3.0

* fix: remove PDF configuration as it is now included in canonical-sphinx==0.3.0

* fix: add Pillow build requirements for source build check
  • Loading branch information
SecondSkoll authored Jan 6, 2025
1 parent 898410d commit 8bef847
Show file tree
Hide file tree
Showing 21 changed files with 31 additions and 337 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/sphinx-python-dependency-build-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
libxslt1-dev \
make \
python3-venv \
rustc
rustc \
libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk libharfbuzz-dev libfribidi-dev libxcb1-dev
- name: Build Sphinx venv
working-directory: "docs"
run: |
Expand Down
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

# Starter pack rules start here

# Environment
/*env*/
docs/.sphinx/venv/

# Sphinx
docs/.sphinx/warnings.txt
docs/.sphinx/.wordlist.dic
docs/.sphinx/.doctrees/
docs/.sphinx/node_modules/

# Vale
docs/.sphinx/styles/*
docs/.sphinx/vale.ini

# Build outputs
docs/_build

# Node.js
docs/package*.json

# Unrelated cache and config files
docs/.DS_Store
docs/__pycache__
docs/.idea/
docs/.vscode/
28 changes: 0 additions & 28 deletions docs/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions docs/.sphinx/_static/css/pdf.css

This file was deleted.

Binary file removed docs/.sphinx/_static/favicon.png
Binary file not shown.
Empty file.
Binary file removed docs/.sphinx/_static/tag.png
Binary file not shown.
52 changes: 0 additions & 52 deletions docs/.sphinx/_templates/header.html

This file was deleted.

96 changes: 0 additions & 96 deletions docs/.sphinx/fonts/LICENCE.txt

This file was deleted.

Binary file removed docs/.sphinx/fonts/Ubuntu-B.ttf
Binary file not shown.
Binary file removed docs/.sphinx/fonts/Ubuntu-R.ttf
Binary file not shown.
Binary file removed docs/.sphinx/fonts/Ubuntu-RI.ttf
Binary file not shown.
Binary file removed docs/.sphinx/fonts/UbuntuMono-B.ttf
Binary file not shown.
Binary file removed docs/.sphinx/fonts/UbuntuMono-R.ttf
Binary file not shown.
Binary file removed docs/.sphinx/fonts/UbuntuMono-RI.ttf
Binary file not shown.
Binary file removed docs/.sphinx/images/Canonical-logo-4x.png
Binary file not shown.
Binary file removed docs/.sphinx/images/front-page-light.pdf
Binary file not shown.
Binary file removed docs/.sphinx/images/normal-page-footer.pdf
Binary file not shown.
119 changes: 0 additions & 119 deletions docs/.sphinx/latex_elements_template.txt

This file was deleted.

2 changes: 1 addition & 1 deletion docs/.sphinx/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
canonical-sphinx[full] @ git+https://github.com/canonical/canonical-sphinx@main
canonical-sphinx[full]
sphinx-autobuild
sphinxcontrib-svg2pdfconverter[CairoSVG]
sphinx-last-updated-by-git
25 changes: 0 additions & 25 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,28 +290,3 @@

if "discourse_prefix" not in html_context and "discourse" in html_context:
html_context["discourse_prefix"] = html_context["discourse"] + "/t/"

#####################
# PDF configuration #
#####################

latex_additional_files = [
"./.sphinx/fonts/Ubuntu-B.ttf",
"./.sphinx/fonts/Ubuntu-R.ttf",
"./.sphinx/fonts/Ubuntu-RI.ttf",
"./.sphinx/fonts/UbuntuMono-R.ttf",
"./.sphinx/fonts/UbuntuMono-RI.ttf",
"./.sphinx/fonts/UbuntuMono-B.ttf",
"./.sphinx/images/Canonical-logo-4x.png",
"./.sphinx/images/front-page-light.pdf",
"./.sphinx/images/normal-page-footer.pdf",
]

latex_engine = "xelatex"
latex_show_pagerefs = True
latex_show_urls = "footnote"

with open(".sphinx/latex_elements_template.txt", "rt") as file:
latex_config = file.read()

latex_elements = ast.literal_eval(latex_config.replace("$PROJECT", project))

0 comments on commit 8bef847

Please sign in to comment.