Skip to main content

A lightweight example directive to make it easy to demonstrate code / results.

Project description

sphinx-examples

A small Sphinx extension to create examples of source markup and the result of rendering it in your documentation. This is useful if you wish to demonstrate the functionality of a new directive or role in Sphinx.

🚨This is very alpha software🚨: It is packaged primarily for convience and not heavily tested. Use at your own risk!

Installation

You can install sphinx-examples with pip:

pip install sphinx-examples

Usage

See the sphinx-examples documentation for more information.

Develop

To develop this extension, follow these steps:

  1. Clone the repository locally

    $ git clone https://github.com/executablebooks/sphinx-examples
    $ cd sphinx-examples
    
  2. Install pre-commit hooks

    $ pre-commit install
    
  3. Install development and documentation dependencies

    $ pip install -e .[sphinx]
    

The codebase for this package is in src/sphinx_examples. Documentation is in docs/.

This package has no testing infrastructure, so be careful when using it! If it becomes more complex or with more features, we may add more testing around it in the future. For not it is packaged for convenience and re-use across EBP repositories.

Build the documentation

The documentation is currently not hosted anywhere, so if you'd like to preview the documentation "live", run the following command:

pip install -e .[sphinx]
sphinx-build docs docs/_build/html

Then browse the HTML files in docs/_build/html to see the rendered documentation.

Inspiration

This project takes heavy inspiration from the Bootstrap v5 documenation.

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-examples-0.0.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

sphinx_examples-0.0.4-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file sphinx-examples-0.0.4.tar.gz.

File metadata

  • Download URL: sphinx-examples-0.0.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for sphinx-examples-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f9c30c28283a0549a49edcccad672aafa3540c47a567645a87bb064610585e39
MD5 81af3be9530453bf4292b46794066e79
BLAKE2b-256 ec35b4294019571197008389bf209e23769311456166e229454d89f7bd10a9bb

See more details on using hashes here.

File details

Details for the file sphinx_examples-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_examples-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2c80591027e7ad4a3a76caa8d72db8367a9c255c6f023e4d87bd8e4d984e20f3
MD5 f66f8d28681c8faec89397b540fd1a88
BLAKE2b-256 807df162c70a2a17046dbdf2aa1e92a4dcc9f102d450134e9bf584fbc8d011a5

See more details on using hashes here.

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