forked from pashango2/sphinx-qsp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
16,422 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 02fdcbff3921306da600bab1b09f31ed | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Let's monky patch! | ||
|
||
|
||
Did you want to further expand 'sphinx-quickstart-plus'? | ||
Editing 'sphinx-quickstart-plus' source code for extension is not cool. | ||
|
||
Let's monky patch! | ||
|
||
Below is an example of a simple extension. | ||
|
||
```python | ||
from sphinx_qsp import quickstart_plus | ||
|
||
# Setting your extension. | ||
your_extension = quickstart_plus.Extension( | ||
"ext_your_ext", "your extensions description.", | ||
conf_py=""" | ||
|
||
# ----Your Extension | ||
import your_extension_package | ||
extension.append("your-extension_name") | ||
) | ||
""", | ||
package=["your_extension_packge"] | ||
) | ||
|
||
# Add your extension. | ||
quickstart_plus.qsp_extensions.extend([ | ||
your_extension | ||
]) | ||
|
||
# Run sphinx-quickstart-plus. | ||
quickstart_plus.main() | ||
|
||
``` | ||
|
||
The base class of extension is the following code. | ||
|
||
```eval_rst | ||
.. literalinclude:: /../sphinx_qsp/quickstart_plus.py | ||
:language: python | ||
:pyobject: Extension | ||
``` | ||
|
||
The extended class of 'sphinx-autobuild' is the following code. | ||
|
||
```eval_rst | ||
.. literalinclude:: /../sphinx_qsp/quickstart_plus.py | ||
:language: python | ||
:pyobject: AutoBuildExtension | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Extensions | ||
|
||
|
||
## Code added to conf.py | ||
### ext_commonmark | ||
|
||
```python | ||
# ----- CommonMark | ||
source_suffix = [source_suffix, '.md'] | ||
|
||
from recommonmark.parser import CommonMarkParser | ||
source_parsers = { | ||
'.md': CommonMarkParser, | ||
} | ||
|
||
from recommonmark.transform import AutoStructify | ||
|
||
github_doc_root = 'https://github.com/rtfd/recommonmark/tree/master/doc/' | ||
def setup(app): | ||
app.add_config_value('recommonmark_config', { | ||
'url_resolver': lambda url: github_doc_root + url, | ||
'auto_toc_tree_section': 'Contents', | ||
}, True) | ||
app.add_transform(AutoStructify) | ||
|
||
``` | ||
|
||
### ext_nbshpinx | ||
|
||
```python | ||
# ----- Jupyter Notebook nbsphinx | ||
extensions.append('nbsphinx') | ||
exclude_patterns.append('**.ipynb_checkpoints') | ||
``` | ||
|
||
### ext_blockdiag | ||
```python | ||
# ----- blockdiag settings | ||
extensions.extend([ | ||
'sphinxcontrib.blockdiag', | ||
'sphinxcontrib.seqdiag', | ||
'sphinxcontrib.actdiag', | ||
'sphinxcontrib.nwdiag', | ||
'sphinxcontrib.rackdiag', | ||
'sphinxcontrib.packetdiag', | ||
]) | ||
blockdiag_html_image_format = 'SVG' | ||
seqdiag_html_image_format = 'SVG' | ||
actdiag_html_image_format = 'SVG' | ||
nwdiag_html_image_format = 'SVG' | ||
rackiag_html_image_format = 'SVG' | ||
packetdiag_html_image_format = 'SVG' | ||
``` | ||
|
||
### ext_fontawesome | ||
```python | ||
# ----- sphinx-fontawesome | ||
import sphinx_fontawesome | ||
extensions.append('sphinx_fontawesome') | ||
``` | ||
|
||
### ext_rtd_theme | ||
```python | ||
# ----- Read the Docs Theme | ||
html_theme = "sphinx_rtd_theme" | ||
``` | ||
### ext_autobuild | ||
|
||
'auto_build' does not override 'conf.py', but rewrites the Makefile. | ||
Type the following command to start auto build. | ||
|
||
``` | ||
$ make livehtml | ||
``` | ||
|
||
On Windows, `auto_build.bat` is generated, please execute it. | ||
|
||
``` | ||
$ auto_build.bat | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. sphix-quickstart-plus docs documentation master file, created by | ||
sphinx-quickstart on Tue Feb 21 17:14:28 2017. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to sphix-quickstart-plus documentation! | ||
====================================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
intro | ||
extensions | ||
extend | ||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# sphinx-quickstart-plus | ||
|
||
This is a utility tool that extends 'sphinx-quickstart'. | ||
|
||
## Licence | ||
|
||
This module is license free :) | ||
|
||
## Installation | ||
|
||
``` | ||
pip install sphinx-quickstart-plus | ||
``` | ||
|
||
## Use | ||
|
||
``` | ||
sphinx-quickstart-plus | ||
``` | ||
|
||
## Features | ||
|
||
- Remember latest setting | ||
- More extensions | ||
- commonmark and recommonmark | ||
- Read the Docs theme | ||
- sphinx_fontawesome | ||
- sphinxcontrib-blockdiag | ||
- nbsphinx | ||
- sphinx-autobuild |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.