mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
42b2c8ad61
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
git+https://github.com/fabpot/sphinx-php.git@52f7bd2216cc22ef52494f346c5643bb2a74513f#egg=sphinx-php
|
@ -28,10 +28,15 @@ if not on_rtd:
|
|||||||
sys.path.append(os.path.abspath('./../_exts/sphinx-php'))
|
sys.path.append(os.path.abspath('./../_exts/sphinx-php'))
|
||||||
|
|
||||||
|
|
||||||
# adding PhpLexer
|
# adding PhpLexer
|
||||||
|
try:
|
||||||
from sphinx.highlighting import lexers
|
from sphinx.highlighting import lexers
|
||||||
from pygments.lexers.compiled import CLexer
|
from pygments.lexers.compiled import CLexer
|
||||||
from pygments.lexers.web import PhpLexer
|
from pygments.lexers.web import PhpLexer
|
||||||
|
php_lexer_available = True
|
||||||
|
except ImportError:
|
||||||
|
php_lexer_available = False
|
||||||
|
print('specific import not available')
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
@ -46,13 +51,33 @@ extensions = [
|
|||||||
'sphinx.ext.todo',
|
'sphinx.ext.todo',
|
||||||
]
|
]
|
||||||
|
|
||||||
if not on_rtd:
|
try:
|
||||||
extensions += [
|
import sensio.sphinx.refinclude
|
||||||
'sensio.sphinx.refinclude',
|
except ImportError:
|
||||||
'sensio.sphinx.configurationblock',
|
print('sensio.sphinx.refinclude is not available')
|
||||||
'sensio.sphinx.phpcode',
|
else:
|
||||||
'sensio.sphinx.bestpractice',
|
extensions += ['sensio.sphinx.refinclude']
|
||||||
]
|
|
||||||
|
try:
|
||||||
|
import sensio.sphinx.configurationblock
|
||||||
|
except ImportError:
|
||||||
|
print('sensio.sphinx.configurationblock is not available')
|
||||||
|
else:
|
||||||
|
extensions += ['sensio.sphinx.configurationblock']
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sensio.sphinx.phpcode
|
||||||
|
except ImportError:
|
||||||
|
print('sensio.sphinx.phpcode')
|
||||||
|
else:
|
||||||
|
extensions += ['sensio.sphinx.phpcode']
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sensio.sphinx.bestpractice
|
||||||
|
except ImportError:
|
||||||
|
print('sensio.sphinx.bestpractice is not avaialble')
|
||||||
|
else:
|
||||||
|
extensions += ['sensio.sphinx.bestpractice']
|
||||||
|
|
||||||
#add configuration for api url
|
#add configuration for api url
|
||||||
|
|
||||||
@ -122,7 +147,7 @@ pygments_style = 'sphinx'
|
|||||||
#keep_warnings = False
|
#keep_warnings = False
|
||||||
|
|
||||||
# -- Settings for symfony doc extension ---------------------------------------------------
|
# -- Settings for symfony doc extension ---------------------------------------------------
|
||||||
if not on_rtd:
|
if php_lexer_available:
|
||||||
# enable highlighting for PHP code not between ``<?php ... ?>`` by default
|
# enable highlighting for PHP code not between ``<?php ... ?>`` by default
|
||||||
lexers['php'] = PhpLexer(startinline=True)
|
lexers['php'] = PhpLexer(startinline=True)
|
||||||
lexers['php-annotations'] = PhpLexer(startinline=True)
|
lexers['php-annotations'] = PhpLexer(startinline=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user