Skip to content

Commit 42bf98c

Browse files
committed
Merge branch 'master' of github.com:readthedocs/sphinx_rtd_theme into responsive-tables
2 parents 82b1e5e + aeae4c1 commit 42bf98c

File tree

132 files changed

+13801
-1170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+13801
-1170
lines changed

.circleci/config.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
version: 2.1
2+
3+
orbs:
4+
node: circleci/[email protected]
5+
6+
commands:
7+
run-tox:
8+
description: "Run tox"
9+
parameters:
10+
version:
11+
type: string
12+
sphinx-version:
13+
type: string
14+
default: "16,17,18,20,21,22,23,24,30,31,32,33,34,35,40,41,latest"
15+
steps:
16+
- checkout
17+
- run: pip install --user tox
18+
- run: tox -e "<<parameters.version>>-sphinx{<<parameters.sphinx-version>>}"
19+
run-build:
20+
description: "Ensure built assets are up to date"
21+
steps:
22+
- checkout
23+
- node/install:
24+
node-version: '14.20'
25+
- run: npm ci
26+
- run: npm run build
27+
- run:
28+
name: Ensure built assets are up to date
29+
command: |
30+
if [[ `git status sphinx_rtd_theme/ --porcelain` ]]
31+
then
32+
echo "ERROR: assets are out of date. Make sure to run 'npm run build' on your branch."
33+
git status sphinx_rtd_theme/ --porcelain
34+
exit 1
35+
fi
36+
37+
jobs:
38+
build:
39+
docker:
40+
- image: 'cimg/python:3.9-node'
41+
steps:
42+
- run-build: {}
43+
py27:
44+
docker:
45+
- image: 'cimg/python:2.7'
46+
steps:
47+
- run-tox:
48+
version: py27
49+
sphinx-version: "16,17,18"
50+
py36:
51+
docker:
52+
- image: 'cimg/python:3.6'
53+
steps:
54+
- run-tox:
55+
version: py36
56+
py37:
57+
docker:
58+
- image: 'cimg/python:3.7'
59+
steps:
60+
- run-tox:
61+
version: py37
62+
py38:
63+
docker:
64+
- image: 'cimg/python:3.8'
65+
steps:
66+
- run-tox:
67+
version: py38
68+
py39:
69+
docker:
70+
- image: 'cimg/python:3.9'
71+
steps:
72+
- run-tox:
73+
version: py39
74+
py310:
75+
docker:
76+
- image: 'cimg/python:3.10'
77+
steps:
78+
- run-tox:
79+
version: py310
80+
sphinx-version: "42,43,44,45,50,51,latest"
81+
82+
workflows:
83+
version: 2
84+
tests:
85+
jobs:
86+
- build
87+
- py310:
88+
requires:
89+
- build
90+
- py39:
91+
requires:
92+
- build
93+
- py38:
94+
requires:
95+
- build
96+
- py37:
97+
requires:
98+
- build
99+
- py36:
100+
requires:
101+
- build
102+
- py27:
103+
requires:
104+
- build

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Document global line endings settings
22
# https://help.github.com/articles/dealing-with-line-endings/
33
* text eol=lf
4+
*.bat text eol=crlf
45

56

67
# Denote all files that are truly binary and should not be modified.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @readthedocs/theme

.github/ISSUE_TEMPLATE.md renamed to .github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'Bug, Needed: replication'
6+
assignees: ''
7+
8+
---
19

210
### Problem
311

.gitignore

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,21 @@
1111
.ruby-version
1212
dist/
1313
bower_components/
14+
include/
15+
lib/
16+
local/
1417
node_modules
1518
npm-debug.log
16-
package-lock.json
19+
pip-selfcheck.json
1720
sphinx_rtd_theme/static/fonts/Lato/
1821
sphinx_rtd_theme/static/fonts/RobotoSlab/
22+
.python-version
23+
.node-version
24+
.tool-versions
25+
.nvmrc
26+
sphinx_rtd_theme/static/js/html5shiv.min.js
27+
sphinx_rtd_theme/static/js/html5shiv-printshiv.min.js
28+
.direnv/
29+
.envrc
30+
# Used for dockerized builds
31+
.container_id

.readthedocs.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
build:
2-
image: latest
1+
version: 2
2+
33
python:
4-
version: 3.6
5-
requirements_file: docs/requirements.txt
4+
version: 3.8
5+
install:
6+
- requirements: docs/requirements.txt
7+
- method: pip
8+
path: .
9+
10+
sphinx:
11+
configuration: docs/conf.py

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.tx/config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[sphinx-rtd-theme.sphinx-rtd-theme]
2+
file_filter = sphinx_rtd_theme/locale/<lang>/LC_MESSAGES/sphinx.po
3+
source_file = sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po
4+
source_lang = en
5+
minimum_perc = 60
6+
7+
[main]
8+
host = https://www.transifex.com
9+
type = PO

Dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# This implicitely includes Python 3.10
2+
FROM node:14-alpine
3+
4+
# Do not use --update since that will also fetch the
5+
# latest node-current package
6+
# 'make' is needed for building documentation
7+
RUN apk add npm make py3-pip py3-wheel
8+
9+
# Add an extra verification that we have the right node
10+
# because the above caused issues
11+
RUN node -v && node -v | grep -q v14 &&\
12+
python3 --version && python3 --version | grep -q "3.10"
13+
14+
RUN pip install pip --upgrade
15+
16+
RUN mkdir -p /project/src/ &&\
17+
mkdir -p /project/docs/build/ &&\
18+
mkdir -p /project-minimal-copy/sphinx_rtd_theme &&\
19+
touch /project-minimal-copy/sphinx_rtd_theme/__init__.py
20+
21+
# This is the main working directory where node_modules
22+
# gets built. During runtime, it's mixed with directories
23+
# from an external environment through a bind mount
24+
WORKDIR /project
25+
26+
# Copy files necessary to run "npm install" and save
27+
# installed packages in the docker image (makes the runtime
28+
# so much faster)
29+
COPY package.json /project/
30+
COPY bin/preinstall.js /project/bin/preinstall.js
31+
32+
RUN cd /project
33+
34+
# It matters that the node environment is installed into the same
35+
# folder, i.e. /project where we will run the environment from
36+
RUN npm install --package-lock-only &&\
37+
npm audit fix &&\
38+
npm install
39+
40+
# This is strictly speaking not necessary, just makes
41+
# running the container faster...
42+
# Install dependencies, then uninstall project itself
43+
COPY setup.py README.rst /project-minimal-copy/
44+
RUN cd /project-minimal-copy &&\
45+
pip install ".[dev]" &&\
46+
/usr/bin/yes | pip uninstall sphinx_rtd_theme
47+
48+
49+
# Copy in files that we need to run the project. These files
50+
# will not be mounted into the runtime from external environment
51+
# so we copy them during build.
52+
COPY webpack.common.js webpack.dev.js webpack.prod.js /project/
53+
54+
# Copy in the entrypoint and we're done
55+
COPY docker-entrypoint.sh /entrypoint.sh
56+
RUN chmod +x /entrypoint.sh
57+
58+
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)