How to use the recommonmark.parser function in recommonmark

To help you get started, we’ve selected a few recommonmark examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dmlc / rabit / doc / sphinx_util.py View on Github external
# -*- coding: utf-8 -*-
"""Helper utilty function for customization."""
import sys
import os
import docutils
import subprocess

if os.environ.get('READTHEDOCS', None) == 'True':
    subprocess.call('cd ..; rm -rf recommonmark;' +
                    'git clone https://github.com/tqchen/recommonmark', shell=True)

sys.path.insert(0, os.path.abspath('../recommonmark/'))
from recommonmark import parser, transform

MarkdownParser = parser.CommonMarkParser
AutoStructify = transform.AutoStructify
github hpi-xnor / BMXNet-v2 / docs / conf.py View on Github external
# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.5.6'

# General information about the project.
project = u'mxnet'
author = u'%s developers' % project
copyright = u'2015-2018, %s' % author
github_doc_root = 'https://github.com/apache/incubator-mxnet/tree/master/docs/'
doc_root = 'http://mxnet.io/'

# add markdown parser
source_parsers = {
    '.md': parser.CommonMarkParser,
    '.Rmd': parser.CommonMarkParser
}
# Version information.
# from mxnet import libinfo
# version = libinfo.__version__
# release = libinfo.__version__

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.autosummary',
    'sphinx.ext.napoleon',
    'sphinx.ext.mathjax',
    'sphinx.ext.viewcode',
    'breathe',
    'mxdoc'
github hpi-xnor / BMXNet-v2 / doc / sphinx_util.py View on Github external
if retcode < 0:
            sys.stderr.write("build terminated by signal %s" % (-retcode))
    except OSError as e:
        sys.stderr.write("build execution failed: %s" % e)

if READTHEDOCS_BUILD or not os.path.exists('../recommonmark'):
    subprocess.call('cd ..; rm -rf recommonmark;' +
                    'git clone https://github.com/tqchen/recommonmark', shell = True)

run_build_mxnet("..")
sys.path.insert(0, os.path.abspath('../recommonmark/'))


from recommonmark import parser, transform

MarkdownParser = parser.CommonMarkParser
AutoStructify = transform.AutoStructify
github rickh94 / airtable_local_backup / docs / conf.py View on Github external
extensions = ['sphinx.ext.autodoc',
    'sphinx.ext.coverage',
    'sphinx.ext.viewcode'
              ]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = ['.rst', '.md']
# source_suffix = '.rst'

source_parsers = {
    '.md': recommonmark.parser.CommonMarkParser,
}

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'Airtable Local Backup'
copyright = '2017, Rick Henry'
author = 'Rick Henry'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = airtable_local_backup.__version__
github hpi-xnor / BMXNet-v2 / docs / conf.py View on Github external
# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.5.6'

# General information about the project.
project = u'mxnet'
author = u'%s developers' % project
copyright = u'2015-2018, %s' % author
github_doc_root = 'https://github.com/apache/incubator-mxnet/tree/master/docs/'
doc_root = 'http://mxnet.io/'

# add markdown parser
source_parsers = {
    '.md': parser.CommonMarkParser,
    '.Rmd': parser.CommonMarkParser
}
# Version information.
# from mxnet import libinfo
# version = libinfo.__version__
# release = libinfo.__version__

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.autosummary',
    'sphinx.ext.napoleon',
    'sphinx.ext.mathjax',
    'sphinx.ext.viewcode',
    'breathe',
github Tencent / QT4A / docs / conf.py View on Github external
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

source_parsers = {
    '.md': markdown.CommonMarkParser,
}
github googlefonts / fontbakery / docs / source / conf.py View on Github external
#
needs_sphinx = "1.3"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"
            , "fontbakery.sphinx_extensions.linkcode" #was "sphinx.ext.linkcode"
            , "fontbakery.sphinx_extensions.profile"
            , "sphinx.ext.napoleon"
            ]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

source_parsers = {".md": recommonmark.parser.CommonMarkParser}

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = [".rst", ".md"]

# The master toctree document.
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
github XiaoMi / mace / docs / conf.py View on Github external
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#

import recommonmark.parser
import sphinx_rtd_theme

project = u'MACE'
author = u'%s Developers' % project
copyright = u'2018, %s' % author

source_parsers = {
    '.md': recommonmark.parser.CommonMarkParser,
}
source_suffix = ['.rst', '.md']

master_doc = 'index'

exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store']

pygments_style = 'sphinx'

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_static_path = ['_static']
smartquotes = False

extensions = [
    'sphinx.ext.autodoc',
github verilog-to-routing / vtr-verilog-to-routing / doc / src / markdown_code_symlinks.py View on Github external
# Removing filename extension (e.g. contributing.md -> contributing)
            todocname, _ = os.path.splitext(self.mapping['code2docs'][todocname])

            newnode = make_refnode(
                builder, fromdocname, todocname, targetid, contnode[0])

        return newnode

    def resolve_any_xref(
            self, env, fromdocname, builder, target, node, contnode):
        res = self.resolve_xref(
            env, fromdocname, builder, 'xref', target, node, contnode)
        return [('markdown_symlinks:xref', res)]


class LinkParser(parser.CommonMarkParser, object):
    def visit_link(self, mdnode):
        ref_node = nodes.reference()

        destination = mdnode.destination

        ref_node.line = self._get_line(mdnode)
        if mdnode.title:
            ref_node['title'] = mdnode.title

        url_check = urlparse(destination)
        # If there's not a url scheme (e.g. 'https' for 'https:...' links),
        # or there is a scheme but it's not in the list of known_url_schemes,
        # then assume it's a cross-reference and pass it to Sphinx as an `:any:` ref.
        known_url_schemes = self.config.get('known_url_schemes')
        if known_url_schemes:
            scheme_known = url_check.scheme in known_url_schemes