diff --git a/README.rst b/README.rst index 8076a98..c33b70e 100644 --- a/README.rst +++ b/README.rst @@ -1,20 +1,23 @@ +.. |.add_linkcode_class+styled with CSS| replace:: styled with CSS +.. _.add_linkcode_class+styled with CSS: https://sphinx-github-style.readthedocs.io/en/latest/add_linkcode_class.html .. |.~.get_linkcode_resolve| replace:: ``get_linkcode_resolve()`` .. _.~.get_linkcode_resolve: https://sphinx-github-style.readthedocs.io/en/latest/linkcode.html#sphinx_github_style.utils.linkcode.get_linkcode_resolve -.. |linkcode_blob| replace:: ``linkcode_blob`` -.. _linkcode_blob: https://sphinx-github-style.readthedocs.io/en/latest/index.html#confval-linkcode_blob -.. |linkcode_link_text| replace:: ``linkcode_link_text`` -.. _linkcode_link_text: https://sphinx-github-style.readthedocs.io/en/latest/index.html#confval-linkcode_link_text -.. |linkcode_resolve| replace:: ``linkcode_resolve`` -.. _linkcode_resolve: https://sphinx-github-style.readthedocs.io/en/latest/index.html#confval-linkcode_resolve -.. |linkcode_url| replace:: ``linkcode_url`` -.. _linkcode_url: https://sphinx-github-style.readthedocs.io/en/latest/index.html#confval-linkcode_url -.. |sphinx+html_context| replace:: ``html_context`` -.. _sphinx+html_context: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_context +.. |.linkcode_blob| replace:: ``linkcode_blob`` +.. _.linkcode_blob: https://sphinx-github-style.readthedocs.io/en/latest/index.html#confval-linkcode_blob +.. |.linkcode_link_text| replace:: ``linkcode_link_text`` +.. _.linkcode_link_text: https://sphinx-github-style.readthedocs.io/en/latest/index.html#confval-linkcode_link_text +.. |.linkcode_resolve| replace:: ``linkcode_resolve`` +.. _.linkcode_resolve: https://sphinx-github-style.readthedocs.io/en/latest/index.html#confval-linkcode_resolve +.. |.linkcode_url| replace:: ``linkcode_url`` +.. _.linkcode_url: https://sphinx-github-style.readthedocs.io/en/latest/index.html#confval-linkcode_url +.. |.sphinx+html_context| replace:: ``html_context`` +.. _.sphinx+html_context: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_context .. |.sphinx.ext.linkcode| replace:: ``sphinx.ext.linkcode`` .. _.sphinx.ext.linkcode: https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html#module-sphinx.ext.linkcode .. |.sphinx.ext.viewcode| replace:: ``sphinx.ext.viewcode`` .. _.sphinx.ext.viewcode: https://www.sphinx-doc.org/en/master/usage/extensions/viewcode.html#module-sphinx.ext.viewcode + .. Title: Sphinx Github Style .. Description: A Sphinx extension to add GitHub source code links and syntax highlighting .. Author: TDKorn (Adam Korn) @@ -32,7 +35,7 @@
-.. image:: https://raw.githubusercontent.com/TDKorn/sphinx-github-style/v1.2.0/docs/source/_static/logo_square_grey_blue.png +.. image:: https://raw.githubusercontent.com/TDKorn/sphinx-github-style/v1.2.1/docs/source/_static/logo_square_grey_blue.png :alt: Sphinx GitHub Style: GitHub Integration and Pygments Style for Sphinx Documentation :width: 25% @@ -96,7 +99,7 @@ Using |.sphinx.ext.linkcode|_, a ``View on GitHub`` link is added to the docume -.. image:: https://raw.githubusercontent.com/TDKorn/sphinx-github-style/v1.2.0/docs/source/_static/github_link.png +.. image:: https://raw.githubusercontent.com/TDKorn/sphinx-github-style/v1.2.1/docs/source/_static/github_link.png :alt: sphinx-github-style adds a "View on GitHub" link @@ -104,7 +107,7 @@ They link to and highlight the corresponding code block in your GitHub repositor -.. image:: https://raw.githubusercontent.com/TDKorn/sphinx-github-style/v1.2.0/docs/source/_static/github_linked_code.png +.. image:: https://raw.githubusercontent.com/TDKorn/sphinx-github-style/v1.2.1/docs/source/_static/github_linked_code.png :alt: The linked corresponding highlighted source code block on GitHub @@ -122,7 +125,7 @@ They link to and highlight the corresponding code block in your GitHub repositor -These links can be `styled with CSS `_ and used with/instead +These links can be |.add_linkcode_class+styled with CSS|_ and used with/instead of the links added by |.sphinx.ext.viewcode|_ .. raw:: html @@ -139,7 +142,7 @@ Syntax Highlighting -.. image:: https://raw.githubusercontent.com/TDKorn/sphinx-github-style/v1.2.0/docs/source/_static/syntax_highlighting.png +.. image:: https://raw.githubusercontent.com/TDKorn/sphinx-github-style/v1.2.1/docs/source/_static/syntax_highlighting.png :alt: A code block highlighted by the Pygments style. It looks identical to GitHub. @@ -171,7 +174,7 @@ Add any (or none) of the following configuration variables to your ``conf.py`` -|linkcode_blob|_ +|.linkcode_blob|_ The blob to link to on GitHub - any of ``"head"``, ``"last_tag"``, or ``"{blob}"`` **Type:** ``str`` @@ -184,18 +187,18 @@ Add any (or none) of the following configuration variables to your ``conf.py`` | -|linkcode_url|_ +|.linkcode_url|_ The link to your GitHub repository formatted as ``https://github.com/user/repo`` **Type:** ``str`` **Default:** ``f"https://github.com/{html_context['github_user']}/{html_context['github_repo']}/{html_context['github_version']}"`` - * If not provided, will attempt to create the link from the |sphinx+html_context|_ dict + * If not provided, will attempt to create the link from the |.sphinx+html_context|_ dict | -|linkcode_link_text|_ +|.linkcode_link_text|_ The text to use for the linkcode link **Type:** ``str`` @@ -204,10 +207,11 @@ Add any (or none) of the following configuration variables to your ``conf.py`` | -|linkcode_resolve|_ +|.linkcode_resolve|_ A ``linkcode_resolve()`` function to use when resolving the link target with |.sphinx.ext.linkcode|_ **Type:** ``Callable`` **Default:** Return value from |.~.get_linkcode_resolve|_ + diff --git a/sphinx_github_style/__init__.py b/sphinx_github_style/__init__.py index 2e42a32..899b2e7 100644 --- a/sphinx_github_style/__init__.py +++ b/sphinx_github_style/__init__.py @@ -5,7 +5,7 @@ from .utils.sphinx import get_conf_val, set_conf_val from .utils.linkcode import get_linkcode_url, get_linkcode_revision, get_linkcode_resolve -__version__ = "1.2.0" +__version__ = "1.2.1" __author__ = 'Adam Korn ' from .add_linkcode_class import add_linkcode_node_class