GithubHelp home page GithubHelp logo

christophjud / sphinxcontrib-autoyaml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jakski/sphinxcontrib-autoyaml

0.0 1.0 0.0 47 KB

Sphinx autodoc extension for documenting YAML files from comments

License: MIT License

Python 100.00%

sphinxcontrib-autoyaml's Introduction

sphinxcontrib-autoyaml

This Sphinx autodoc extension documents YAML files from comments. Documentation is returned as reST definitions, e.g.:

This document:

###
# Enable Nginx web server.
enable_nginx: true

###
# Enable Varnish caching proxy.
enable_varnish: true

would be turned into text:

enable_nginx

   Enable Nginx web server.

enable_varnish

   Enable Varnish caching proxy.

See tests/examples/output/index.yml and tests/examples/output/index.txt for more examples.

autoyaml will take into account only comments which first line starts with autoyaml_doc_delimiter.

Usage

You can use autoyaml directive, where you want to extract comments from YAML file, e.g.:

Some title
==========

Documenting single YAML file.

.. autoyaml:: some_yml_file.yml

Options

Options available to use in your configuration:

  • autoyaml_root(..) Look for YAML files relatively to this directory.
  • autoyaml_doc_delimiter(###) Character(s) which start a documentation comment.
  • autoyaml_comment(#) Comment start character(s).
  • autoyaml_level(1) Parse comments from nested mappings n-levels deep.

Installing

Issue command:

pip install sphinxcontrib-autoyaml

And add extension in your project's conf.py:

extensions = ["sphinxcontrib.autoyaml"]

sphinxcontrib-autoyaml's People

Contributors

jakski avatar jakskiwork avatar whot avatar

Watchers

James Cloos 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.