Skip to content

Commit

Permalink
自测环境初始化脚本和主题
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Feb 27, 2018
1 parent 9321d8d commit a3605e6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/build
/py3env
12 changes: 12 additions & 0 deletions py3env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

SCRIPT_DIR="$(dirname $0)";

if [ ! -e "$SCRIPT_DIR/py3env/bin/pip3" ]; then
virtualenv -p "$(which python3)" "$SCRIPT_DIR/py3env";
export PATH=$SCRIPT_DIR/py3env/bin:$PATH;
pip3 install sphinx sphinx-autobuild sphinx_rtd_theme recommonmark ;
echo "#!/bin/bash
export export PATH=$SCRIPT_DIR/py3env/bin:\$PATH;
" > $SCRIPT_DIR/py3env/source.sh ;
fi
17 changes: 11 additions & 6 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
# 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.
#
# import os
# import sys
import os
import sys
# sys.path.insert(0, os.path.abspath('.'))

import sphinx_rtd_theme
from recommonmark.parser import CommonMarkParser

# -- Project information -----------------------------------------------------

Expand All @@ -40,7 +42,6 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.mathjax',
Expand All @@ -54,8 +55,12 @@
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ['.rst', '.md']
# source_suffix = '.rst'

source_parsers = {
'.md': CommonMarkParser,
}

# The master toctree document.
master_doc = 'index'
Expand All @@ -81,7 +86,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
22 changes: 7 additions & 15 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ xresloader文档

.. _user-docs:

用户文档
-----------------------------------------------

.. toctree::
:maxdepth: 2
:caption: 用户文档

users/download
users/quick_start
Expand All @@ -52,11 +50,9 @@ xresloader文档

.. _development-docs:

开发文档
-----------------------------------------------

.. toctree::
:maxdepth: 2
:caption: 开发文档

development/dependency
development/build
Expand All @@ -66,16 +62,12 @@ xresloader文档

.. _about-docs:

其他
-----------------------------------------------

.. toctree::
:caption: 其他

about

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
..
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

0 comments on commit a3605e6

Please sign in to comment.