Skip to content

Commit 85cee7f

Browse files
committed
Update docs-ci.yml and conf.py to current
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 717d3b5 commit 85cee7f

File tree

2 files changed

+50
-10
lines changed

2 files changed

+50
-10
lines changed

.github/workflows/docs-ci.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717

1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v4
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222

2323
- name: Give permission to run scripts
2424
run: chmod +x ./docs/scripts/doc8_style_check.sh
2525

2626
- name: Install Dependencies
27-
run: pip install -e .[docs]
27+
run: pip install -e .[docs]
2828

2929
- name: Check Sphinx Documentation build minimally
3030
working-directory: ./docs
@@ -33,5 +33,3 @@ jobs:
3333
- name: Check for documentation style errors
3434
working-directory: ./docs
3535
run: ./scripts/doc8_style_check.sh
36-
37-

docs/source/conf.py

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,25 @@
2828
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2929
# ones.
3030
extensions = [
31-
'sphinx.ext.intersphinx',
31+
"sphinx.ext.intersphinx",
32+
"sphinx_reredirects",
3233
]
3334

35+
36+
# Redirects for olds pages
37+
# See https://documatt.gitlab.io/sphinx-reredirects/usage.html
38+
redirects = {}
39+
40+
# This points to aboutcode.readthedocs.io
41+
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
42+
# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83
43+
44+
intersphinx_mapping = {
45+
"aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None),
46+
"scancode-workbench": ("https://scancode-workbench.readthedocs.io/en/develop/", None),
47+
}
48+
49+
3450
# Add any paths that contain templates here, relative to this directory.
3551
templates_path = ['_templates']
3652

@@ -59,8 +75,34 @@
5975
"github_repo": "aboutcode-toolkit",
6076
"github_version": "develop", # branch
6177
"conf_py_path": "/docs/source/", # path in the checkout to the docs root
62-
}
78+
}
79+
80+
html_css_files = ["_static/theme_overrides.css"]
81+
82+
83+
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
84+
html_show_sphinx = True
85+
86+
# Define CSS and HTML abbreviations used in .rst files. These are examples.
87+
# .. role:: is used to refer to styles defined in _static/theme_overrides.css and is used like this: :red:`text`
88+
rst_prolog = """
89+
.. |psf| replace:: Python Software Foundation
90+
91+
.. # define a hard line break for HTML
92+
.. |br| raw:: html
93+
94+
<br />
95+
96+
.. role:: red
97+
98+
.. role:: img-title
99+
100+
.. role:: img-title-para
101+
102+
"""
103+
104+
# -- Options for LaTeX output -------------------------------------------------
63105

64-
html_css_files = [
65-
'_static/theme_overrides.css'
66-
]
106+
latex_elements = {
107+
'classoptions': ',openany,oneside'
108+
}

0 commit comments

Comments
 (0)