Source code for pyquickhelper.sphinxext.sphinx_githublink_extension

# -*- coding: utf-8 -*-
"""
Defines a :epkg:`sphinx` extension to display a link on github.


:githublink:`%|py|6`
"""
import os
import sphinx
from docutils import nodes
from docutils.parsers.rst.roles import set_classes











[docs]def setup(app): """ setup for ``githublink`` (:epkg:`sphinx`) :githublink:`%|py|216` """ app.add_role('githublink', githublink_role) app.add_role('gitlink', githublink_role) app.add_config_value('githublink_options', None, 'env') return {'version': sphinx.__display_version__, 'parallel_read_safe': True}