Skip to content

Commit 352d4a7

Browse files
committed
Upgrade all CI to Sphinx 1.8.5
1 parent 9260bc1 commit 352d4a7

Some content is hidden

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

41 files changed

+75
-3299
lines changed

.doctor-rst.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ whitelist:
5050
- '/FOSUserBundle(.*)\.yml/'
5151
- '/``.yml``/'
5252
- '/(.*)\.orm\.yml/' # currently DoctrineBundle only supports .yml
53+
- '/rst-class/'
5354
lines:
5455
- 'in config files, so the old ``app/config/config_dev.yml`` goes to'
5556
- '#. The most important config file is ``app/config/services.yml``, which now is'
@@ -72,3 +73,4 @@ whitelist:
7273
- '$var .= "Because of this `\xE9` octet (\\xE9),\n";'
7374
- "`Deploying Symfony 4 Apps on Heroku`_."
7475
- ".. _`Deploying Symfony 4 Apps on Heroku`: https://devcenter.heroku.com/articles/deploying-symfony4"
76+
- '.. code-block:: twig'

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: sudo apt-get install python-dev build-essential
3131

3232
- name: "Cache pip"
33-
uses: actions/cache@v1
33+
uses: actions/cache@v2
3434
with:
3535
path: ~/.cache/pip
3636
key: ${{ runner.os }}-pip-${{ hashFiles('_build/.requirements.txt') }}
@@ -41,7 +41,7 @@ jobs:
4141
run: pip install -r _build/.requirements.txt
4242

4343
- name: "Build documentation"
44-
run: make -C _build SPHINXOPTS=-nqW html
44+
run: make -C _build SPHINXOPTS="-nqW -j auto" html
4545

4646
doctor-rst:
4747
name: DOCtor-RST

_build/.requirements.txt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
alabaster==0.7.10
2-
Babel==2.4.0
31
docutils==0.13.1
4-
imagesize==0.7.1
5-
Jinja2==2.10.1
6-
MarkupSafe==1.0
72
Pygments==2.2.0
8-
pytz==2017.2
9-
requests==2.20.0
10-
six==1.10.0
11-
snowballstemmer==1.2.1
12-
sphinx==1.3.6
13-
git+https://github.com/fabpot/sphinx-php.git@v1.0.14#egg_name=sphinx-php
3+
sphinx==1.8.5
4+
git+https://github.com/fabpot/sphinx-php.git@v2.0.0#egg_name=sphinx-php
5+
jsx-lexer===0.0.8
6+
sphinx_rtd_theme==0.5.0
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,7 @@
1-
from sphinx.highlighting import lexers, PygmentsBridge
21
from pygments.style import Style
3-
from pygments.formatters import HtmlFormatter
42
from pygments.token import Keyword, Name, Comment, String, Error, \
53
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
64

7-
from sphinx.writers.html import HTMLTranslator
8-
from docutils import nodes
9-
from sphinx.locale import admonitionlabels, lazy_gettext
10-
11-
customadmonitionlabels = admonitionlabels
12-
l_ = lazy_gettext
13-
customadmonitionlabels['best-practice'] = l_('Best Practice')
14-
15-
def _getType(path):
16-
return path[:path.find('/')]
17-
18-
def _isIndex(path):
19-
return 'index' in path
20-
21-
class SensioHTMLTranslator(HTMLTranslator):
22-
def __init__(self, builder, *args, **kwds):
23-
HTMLTranslator.__init__(self, builder, *args, **kwds)
24-
builder.templates.environment.filters['get_type'] = _getType
25-
builder.templates.environment.tests['index'] = _isIndex
26-
self.highlightlinenothreshold = 0
27-
28-
def visit_literal(self, node):
29-
self.body.append(self.starttag(node, 'code', '', CLASS='docutils literal notranslate'))
30-
31-
def depart_literal(self, node):
32-
self.body.append('</code>')
33-
34-
def visit_admonition(self, node, name=''):
35-
self.body.append(self.starttag(node, 'div', CLASS=('admonition-wrapper')))
36-
self.body.append('<div class="admonition ' + name + '">')
37-
if name and name != 'seealso':
38-
node.insert(0, nodes.title(name, customadmonitionlabels[name]))
39-
self.set_first_last(node)
40-
41-
def depart_admonition(self, node=None):
42-
self.body.append('</div></div>\n')
43-
44-
def visit_sidebar(self, node):
45-
self.body.append(self.starttag(node, 'div', CLASS=('admonition-wrapper')))
46-
self.body.append('<div class="admonition admonition-sidebar">')
47-
self.set_first_last(node)
48-
self.in_sidebar = 1
49-
50-
def depart_sidebar(self, node):
51-
self.body.append('</div></div>\n')
52-
self.in_sidebar = None
53-
54-
# overriden to add a new highlight div around each block
55-
def visit_literal_block(self, node):
56-
if node.rawsource != node.astext():
57-
# most probably a parsed-literal block -- don't highlight
58-
return BaseTranslator.visit_literal_block(self, node)
59-
lang = self.highlightlang
60-
linenos = node.rawsource.count('\n') >= \
61-
self.highlightlinenothreshold - 1
62-
highlight_args = node.get('highlight_args', {})
63-
if node.has_key('language'):
64-
# code-block directives
65-
lang = node['language']
66-
highlight_args['force'] = True
67-
if node.has_key('linenos'):
68-
linenos = node['linenos']
69-
def warner(msg):
70-
self.builder.warn(msg, (self.builder.current_docname, node.line))
71-
highlighted = self.highlighter.highlight_block(
72-
node.rawsource, lang, warn=warner, linenos=linenos,
73-
**highlight_args)
74-
starttag = self.starttag(node, 'div', suffix='',
75-
CLASS='highlight-%s' % lang)
76-
self.body.append('<div class="literal-block">' + starttag + highlighted + '</div></div>\n')
77-
raise nodes.SkipNode
78-
795
class SensioStyle(Style):
806
background_color = "#000000"
817
default_style = ""
@@ -158,8 +84,3 @@ class SensioStyle(Style):
15884
Generic.Subheading: "bold #800080", # class: 'gu'
15985
Generic.Traceback: "bold #a40000", # class: 'gt'
16086
}
161-
162-
def setup(app):
163-
app.set_translator('html', SensioHTMLTranslator)
164-
165-
return {'parallel_read_safe': True}

_build/_static/rtd_custom.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
body {
2+
font-family:Lucida Grande,Lucida Sans Unicode,Lucida Sans,Geneva,Verdana,sans-serif !important;
3+
}
4+
5+
h1, h2, h3, h4, h5, h6 {
6+
font-family:Georgia,Times New Roman,Times,serif !important;
7+
line-height:1.2 !important;
8+
margin-top:0 !important;
9+
margin-bottom:.5em !important;
10+
}
11+
p, .rst-content li{
12+
font-size:14px !important;
13+
line-height:1.45 !important;
14+
}
15+
.wy-menu-vertical a {
16+
font-size:14px !important;
17+
padding-right:0 !important;
18+
}
19+
20+
.highlight {
21+
background:#1e2125 !important;
22+
color:#fafafa !important;
23+
}

_build/_static/symfony-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

_build/_themes/sphinx_rtd_theme/__init__.py

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

_build/_themes/sphinx_rtd_theme/breadcrumbs.html

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

_build/_themes/sphinx_rtd_theme/footer.html

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

0 commit comments

Comments
 (0)