Merge branch '12.0-one-doc-edi' of github.com:odoo/documentation-user into 12.0-one-doc-edi

This commit is contained in:
Elisabeth Dickinson 2021-03-25 15:51:41 +01:00
commit 4b9ce8f034
2 changed files with 11 additions and 4 deletions

14
conf.py
View File

@ -2,8 +2,8 @@ import os
import sys
from pathlib import Path
from pygments.lexers.web import PhpLexer
from sphinx.highlighting import lexers
from pygments.lexers import JsonLexer, XmlLexer
from sphinx.util import logging
_logger = logging.getLogger(__name__)
@ -181,8 +181,10 @@ html_permalinks = True # Sphinx >= 3.5
html_js_files = []
html_css_files = []
# Monkeypatch PHP lexer to not require <?php
lexers['php'] = PhpLexer(startinline=True)
# PHP lexer option to not require <?php
highlight_options = {
'php': {'startinline': True},
}
#=== Options for LaTeX output ===#
@ -242,6 +244,10 @@ def setup(app):
app.add_config_value('canonical_version', None, 'env')
app.add_config_value('versions', None, 'env')
app.add_config_value('languages', None, 'env')
app.add_lexer('json', JsonLexer())
app.add_lexer('xml', XmlLexer())
app.connect('html-page-context', _generate_alternate_urls)

View File

@ -1,5 +1,6 @@
docutils~=0.14
pygments~=2.6.1
pygments-csv-lexer~=0.1.3
pysass~=0.1.0
sphinx~=3.0
werkzeug==0.14.1 # TODO ANVFE bump werkzeug to 0.16 ?