mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
remove php/sension extensions if building on rtd
This commit is contained in:
parent
dad59e3b04
commit
66c33f7feb
@ -16,11 +16,15 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
if not on_rtd:
|
||||
sys.path.append(os.path.abspath('./../_exts/sphinx-php'))
|
||||
|
||||
|
||||
@ -40,6 +44,10 @@ from pygments.lexers.web import PhpLexer
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.todo',
|
||||
]
|
||||
|
||||
if not on_rtd:
|
||||
extensions += [
|
||||
'sensio.sphinx.refinclude',
|
||||
'sensio.sphinx.configurationblock',
|
||||
'sensio.sphinx.phpcode',
|
||||
@ -110,6 +118,7 @@ pygments_style = 'sphinx'
|
||||
#keep_warnings = False
|
||||
|
||||
# -- Settings for symfony doc extension ---------------------------------------------------
|
||||
if not on_rtd:
|
||||
# enable highlighting for PHP code not between ``<?php ... ?>`` by default
|
||||
lexers['php'] = PhpLexer(startinline=True)
|
||||
lexers['php-annotations'] = PhpLexer(startinline=True)
|
||||
@ -360,8 +369,7 @@ epub_exclude_files = ['search.html']
|
||||
# If false, no index is generated.
|
||||
#epub_use_index = True
|
||||
|
||||
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
|
||||
|
||||
#-- Options for todo
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user