Giter Club home page Giter Club logo

preparer-sphinx's Introduction

Deconst Sphinx preparer

.rst ๐Ÿ‘‰ ๐Ÿ”ง ๐Ÿ‘‰ .json

Build Status Docker Repository on Quay.io

The deconst Sphinx preparer builds Sphinx documentation into custom JSON metadata envelopes. It's intended to be used within a CI system to present content to the rest of build pipeline.

Running locally

To run the Sphinx preparer locally, you'll need to install Docker for your platform.

Once you have Docker set up, export any desired configuration variables and run deconst-preparer-sphinx.sh with the absolute path to any Sphinx-based content repository.

./deconst-preparer-sphinx.sh /absolute/path/to/content-repo

Configuration

Environment variables

The following values may be present in the environment:

  • CONTENT_ROOT is a path containing Sphinx content to prepare. Default: $(pwd)
  • ENVELOPE_DIR is the destination directory for metadata envelopes. Default: $(pwd)/_build/deconst-envelopes/
  • ASSET_DIR is the destination directory for referenced assets. Default: $(pwd)/_build/deconst-assets/
  • CONTENT_ID_BASE is a prefix that's unique among the content repositories associated with the target deconst instance. Our convention is to use the base URL of the GitHub repository. Default: Read from _deconst.json

conf.py

By default, the preparer will use the deconst-serial builder, which will generate a separate HTML file for every ReST file in your repository. This behavior is similar to running make html. If you would rather generate a single HTML file with the contents of your entire repo (ร  la make singlehtml), you must add the following line to your conf.py file:

builder = 'deconst-single'

The deconst_default_unsearchable property may be set to True to exclude all content from this content repository from being indexed for search.

deconst_default_unsearchable = True

One or more page categories can be specified for the entire content repository at once with the deconst_categories property. These are useful for constraining search results and may be used by site templates.

deconst_categories = ['global category one', 'global category two']

Per-page metadata

The Sphinx preparer offers page-level customization by reading per-page metadata that's present on each page.

The page title offered to Deconst templates may be overridden with the deconsttitle attribute:

:deconsttitle: Not the Sphinx title

This is especially important for your index.rst file, which by default generates a title of "< no title >".

Set additional categories for individual pages with the deconstcategories attribute. Use a comma-separated list of category names. Whitespace will be trimmed from each category.

:deconstcategories: page category one, page category two

Individual pages can be excluded from search indexing with the deconstunsearchable attribute. Use the string true to exclude a specific page.

:deconstunsearchable: true

preparer-sphinx's People

Contributors

smashwilson avatar nimbinatus avatar ktbartholomew avatar kenperkins avatar

Watchers

 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.