Skip to content

pashango2/sphinx-qsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Code added to conf.py

ext_commonmark

# ----- 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

# ----- Jupyter Notebook nbsphinx
extensions.append('nbsphinx')
exclude_patterns.append('**.ipynb_checkpoints')

ext_blockdiag

# ----- 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

# ----- sphinx-fontawesome
import sphinx_fontawesome
extensions.append('sphinx_fontawesome')

ext_rtd_theme

# ----- 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

Releases

No releases published

Packages

No packages published