Skip to content
remobjectsPublic

About

Html generator for product documentation sites

Resources

Stars

11 stars

Watchers

11 watching

Forks

Latest commit

 

History

140 Commits

Folders and files

Repository files navigation

docsgen

Html generator for product documentation sites.

This is the tool we use to generate http://docs.elementscompiler.com/, http://docs.dataabstract.com/ and http://docs.hydra4.com/ with.

It expects a directory like the docs subdir and generates relocatable html from it, including a Javascript based search index, a table of context generator based on header tags (index:) and highlightJS based highlighting.

Works in both a "live" mode where updating files updates the html live and even refreshes the pages that are open, or in generator mode.

Modern documentation layout

Add docs_layout: modern to a project's _config to opt into the modern layout in the default theme. The masthead uses the project title by default. A project can set docs_brand_name for the bold product name, docs_brand_prefix for the text before it, and docs_brand_icon for an icon path relative to the documentation root.

In a project stylesheet loaded through extra_css, set --docs-masthead-art to a CSS image or gradient and --docs-accent to a link color on .docs-modern. Use --docs-surface and --docs-line to tint the sidebar and pagination cards, and --docs-nav-hover and --docs-nav-active to set the sidebar row backgrounds. Relative URLs in those CSS values resolve from the project stylesheet. The default theme supplies the navigation, article, and page outline.

Per-page Markdown

Building a site writes an index.md beside each published page's index.html. The built-in themes advertise it with a Markdown alternate link. Custom themes can use {% if markdown_url %}<link rel="alternate" type="text/markdown" href="{{ markdown_url }}">{% endif %} in their HTML head. Page copies include expanded Liquid content and link directly to other page copies. Set markdown-base-url to the public site root to recognize absolute links back to the site. The Markdown command still produces the combined corpus.

Conditional shared navigation

A mount can supply flags that apply only to its mounted copy and descendants:

mount: ../Shared/Accounts/ : campfire
mount: ../Shared/Accounts/ as Accounts/ : elements, publishing

Use ? on an index: or mount: entry to require any of its comma-separated terms. Prefix a term with ! to require that flag to be absent:

index: Gemini.md
index: GitLab.md Custom label ? !brain
index: GooglePlayConsole.md ? elements,campfire
mount: ../Media/ : media ? campfire

Flags are case-insensitive. Nested mounts inherit the parent's flags and add their own; their conditions are evaluated against the parent flags. Without flags, positive terms do not match and negated terms do. ? and : suffixes are parsed before display-name overrides; malformed flag lists are errors. Excluded mounted pages are omitted from that copy's navigation and output.

For a provider list that follows the filtered navigation, add nav-group: to each child page and use {% child_pages "AI Providers" %} in the parent body. The tag emits a level-three heading and links to direct children in that group, omitting empty groups. {% child_pages %} lists all direct children without a group heading. Labels and order follow the navigation entries. An optional nav-note: on a child adds text after its link in generated lists.

About

Html generator for product documentation sites

Resources

Stars

11 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages