Skip to main content

Sphinx Github Integration and Github Dark Theme Pygments Style

Project description

Github Pygments Style and Sphinx Integration

Components

~.linkcode_resolve() ~.add_linkcode_node_class()

  • TDKStyle.py - Highlights code similar to Github Pretty Lights Dark

  • TDKMethLexor - Highlights methods in code blocks

  • ~.add_linkcode_node_class() - Updates linkcode nodes a new linkcode-link class to use for CSS styling separately from viewcode links

  • Add default ~.linkcode_resolve()

  • github_style.css - Linkcode link icon + text

Config Values

linkcode_default_blob: str = any('last_tag', 'master', 'head')
linkcode_link_text: str = "View on GitHub"
linkcode_url: str = "https://github.com/tdkorn/sphinx-github-style"
linkcode_resolve: func = None

linkcode_default_blob: str = any(‘last_tag’, ‘master’, ‘head’)

  • Default is “master”

  • How blob is chosen
    • If head is a tag, uses the tag

    • If head is not a tag, then
      • If default blob is “last_tag” -> Retrieve most recent tag; if no tags exist, uses master

      • If default blob is “head” -> uses last commit hash; if wasn’t able to get head, uses “master”

      • If default blob is “master” -> uses “master”

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-github-style-0.0.1b7.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distributions

sphinx_github_style-0.0.1b7-py3.10.egg (16.8 kB view hashes)

Uploaded Source

sphinx_github_style-0.0.1b7-py3-none-any.whl (10.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page