Skip to content

Commit 92b799a

Browse files
committed
✨ upstream sphinx templates. fix #49
1 parent 9db77d9 commit 92b799a

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ jobs:
2121
stage: test
2222

2323
before_script:
24-
- git clone https://github.com/sphinx-doc/sphinx ../sphinx
25-
- (cd .. && ln -s sphinx/sphinx/templates/quickstart/
26-
sphinx-quickstart-templates)
2724
- sed -i "s/{{ \(\w*\) | repr }}/'{{ \1 }}'/;s/{%- \(for\|endfor\)/{% \1/"
28-
../sphinx-quickstart-templates/conf.py_t
25+
~/.moban/sphinx/sphinx/templates/quickstart/conf.py_t
2926

3027
script:
3128
- find templates/ -type f -name '*.jj2' -exec echo '{}' \;|sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file

local.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
requires:
2+
- https://github.com/sphinx-doc/sphinx
13
configuration:
24
configuration: config/data.yml
35
template_dir:
46
- .moban.dt/
57
- templates
6-
- ../sphinx-quickstart-templates
8+
- sphinx:sphinx/templates/quickstart
79
targets:
810
- .gitignore: gitignore.jj2
911
- LICENSE: NEW_BSD_LICENSE.jj2

templates/docs/conf.py_t

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ release = u'{{ release_str }}'
4848
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4949
# ones.
5050
extensions = [
51-
{% for ext in extensions %}
51+
{%- for ext in extensions %}
5252
'{{ ext }}',
53-
{% endfor %}
53+
{%- endfor %}
5454
]
5555

5656
# Add any paths that contain templates here, relative to this directory.
@@ -62,23 +62,25 @@ templates_path = ['{{ dot }}templates']
6262
# source_suffix = ['.rst', '.md']
6363
source_suffix = '{{ suffix }}'
6464

65+
{% if master_doc != 'index' -%}
6566
# The master toctree document.
6667
master_doc = '{{ master_str }}'
6768

69+
{% endif -%}
6870
# The language for content autogenerated by Sphinx. Refer to documentation
6971
# for a list of supported languages.
7072
#
7173
# This is also used if you do content translation via gettext catalogs.
7274
# Usually you set "language" from the command line for these cases.
73-
language = '{{ language }}'
75+
language = {{ language | repr }}
7476

7577
# List of patterns, relative to source directory, that match files and
7678
# directories to ignore when looking for source files.
7779
# This pattern also affects html_static_path and html_extra_path.
7880
exclude_patterns = [{{ exclude_patterns }}]
7981

8082
# The name of the Pygments (syntax highlighting) style to use.
81-
pygments_style = 'sphinx'
83+
pygments_style = None
8284

8385

8486
# -- Options for HTML output -------------------------------------------------

0 commit comments

Comments
 (0)