Giter Site home page Giter Site logo

hsingh23 / sphinxcontrib-osexample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from svx/sphinxcontrib-osexample

1.0 2.0 0.0 138 KB

This Sphinx extension is intended to display package manager examples next to each other

Python 79.68% Shell 1.96% CSS 7.03% JavaScript 11.33%

sphinxcontrib-osexample's Introduction

Documentation Status

osexample extension for Sphinx

This is a modified fork of Serge Domkowski's examplecode extension for Sphinx.

About

This is a simple extension that, when rendered as HTML, will fold multiple code blocks containing different operating systems administration examples into a single block which can be toggled from one to another using buttons.

It's intended to be used for displaying package manager examples. (e.g., apt install or dnf install).

This extension adds the example-code directive which adds a class to a container wrapping the code blocks that should be folded. The class allows the included Javascript and CSS to render the folded block and buttons.

Currently supported are: Debian, Ubuntu, Fedora, CentOS, OSX

Quick Example

Source would look something like this:

.. example-code::
    .. code-block:: Debian

        sudo apt install htop

    .. code-block:: Fedora

        sudo dnf install htop

This will create an output like this:

Example how it looks like as generated HTML

Installation

$ pip install sphinxcontrib-osexample
Enabling the extension in Sphinx

Just add sphinxcontrib.examplecode to the list of extensions in the conf.py file. For example:

extensions = ['sphinxcontrib.osexample']

Documentation

Full documentation for end users can be found in the "docs" folder.

It is also available online on Read The Docs

Contribute

Support

If you are having issues, please let us know.

License

The project is licensed under BSD.

sphinxcontrib-osexample's People

Stargazers

Roman avatar

Watchers

James Cloos avatar Harsh Singh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.