8000 Merge remote-tracking branch 'upstream/master' · obulat/python-docs-theme@1e182f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e182f3

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents e1ee8bd + 5586486 commit 1e182f3

File tree

6 files changed

+53
-10
lines changed

6 files changed

+53
-10
lines changed

.github/workflows/tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build_doc:
13+
name: 'Build cpython doc'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.7
20+
- name: clone docsbuild scripts
21+
run: |
22+
git clone https://github.com/python/docsbuild-scripts/
23+
- name: setup requirements
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install jinja2 markupsafe
27+
- name: build docs
28+
run: |
29+
python3 ./docsbuild-scripts/build_docs.py --quick --build-root ./build_root --www-root ./www --log-directory ./logs --group $(id -g) --skip-cache-invalidation --theme $(pwd) --language en --branch 3.9
30+
- name: 'Upload'
31+
uses: actions/upload-artifact@v2.2.2
32+
with:
33+
name: doc-html
34+
path: www/

README.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ trust.
1313
To use the theme, install it into your docs build environment via ``pip``
1414
(preferably in a virtual environment).
1515

16-
1. Create and activate a virtual environment::
1716

18-
$ python -m venv env
19-
$ source env/bin/activate
17+
Configuration options
18+
---------------------
2019

21-
2. Install python-docs-theme using `pip`::
22-
23-
(env)$ python -m pip install python-docs-theme
20+
To use this theme, add the following to ``conf.py``:
21+
22+
- ``html_theme = 'python_docs_theme'``
23+
24+
- ``html_sidebars``, defaults taken from http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars

python_docs_theme/layout.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ <h3>{{ _('Navigation') }}</h3>
115115
<div class="footer">
116116
&copy; <a href="{{ pathto('copyright') }}">{% trans %}Copyright{% endtrans %}</a> {{ copyright|e }}.
117117
<br />
118+
{% trans %}This page is licensed under the Python Software Foundation License Version 2.{% endtrans %}
119+
<br />
120+
{% trans %}Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.{% endtrans %}
121+
<br />
122+
{% trans pathto_license=license_file %}See <a href="{{ license_file }}">History and License</a> for more information.{% endtrans %}
123+
<br /><br />
118124

119125
{% include "footerdonate.html" %}
120126
<br />

python_docs_theme/static/copybutton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ $(document).ready(function() {
55
var div = $('.highlight-python .highlight,' +
66
'.highlight-python3 .highlight,' +
77
'.highlight-pycon .highlight,' +
8+
'.highlight-pycon3 .highlight,' +
89
'.highlight-default .highlight');
910
var pre = div.find('pre');
1011

@@ -61,4 +62,3 @@ $(document).ready(function() {
6162
}
6263
});
6364
});
64-

python_docs_theme/theme.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[theme]
22
inherit = default
33
stylesheet = pydoctheme.css
4-
pygments_style = sphinx
4+
pygments_style = default
55

66
[options]
77
bodyfont = 'Lucida Grande', Arial, sans-serif
@@ -21,6 +21,8 @@ visitedlinkcolor = #00608f
2121
headtextcolor = #1a1a1a
2222
headbgcolor = white
2323
headlinkcolor = #aaaaaa
24+
codebgcolor = #eeffcc
25+
codetextcolor = #333333
2426

2527
issues_url =
2628
root_name = Python

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
name='python-docs-theme',
1414
# Version is date based as year.month[.serial], where serial is used
1515
# if multiple releases are needed to address build failures.
16-
version='2020.1.post1',
16+
version='2020.12.post1',
1717
description='The Sphinx theme for the CPython docs and related projects',
1818
long_description=long_description,
1919
author='PyPA',
2020
author_email='distutils-sig@python.org',
21-
url='https://docs.python.org',
21+
url='https://github.com/python/python-docs-theme/',
2222
packages=['python_docs_theme'],
2323
include_package_data=True,
2424
entry_points={

0 commit comments

Comments
 (0)
0