Skip to content

Add rake docs:jekyll task for Jekyll-compatible doc publishing #232

@miharp

Description

@miharp

OpenVoxProject/openvox-docs#98 requests publishing OpenBolt docs to the openvox-docs
Jekyll site. An initial attempt was reverted (OpenVoxProject/openvox-docs#145) with two
blocking issues identified. One is already solved; one remains.

What already exists

rake docs:all (rakelib/docs.rake) renders all 9 ERB templates to static .md files
in documentation/. The CI run-dita job runs this task then feeds the output through
DITA-OT, which handles its own link resolution. ERB rendering is not a problem.

bolt.ditamap defines the full navigation hierarchy — section groupings, page ordering,
navtitle attributes, and parent/child nesting. It is the authoritative nav structure
and should be the single source of truth for Jekyll navigation as well.

The remaining gaps

1. .md link rewriting

The docs use relative .md links in both Markdown syntax and raw HTML <a href="...">
attributes. Jekyll serves the collection as .html, so these 404. DITA-OT resolves them
internally; Jekyll does not. This was the source of 94 broken links in the reverted attempt.

2. Missing front matter

Static .md files in documentation/ have no Jekyll front matter. Each file needs
layout: and title: added and committed directly to the source file. This should be
done once as a committed change — not generated at build time.

Note: Never add permalink: to front matter. openvox-docs routes via a
_openbolt_latest symlink, which causes Jekyll to process each file twice; an explicit
permalink causes conflicts. Only layout: and title: should be present.

For ERB-generated reference pages, front matter belongs in the templates themselves.

3. Navigation

There is no Jekyll nav data. bolt.ditamap already expresses the full hierarchy but
Jekyll cannot consume it directly. Maintaining a separate nav file in openvox-docs would
duplicate the DITA map and drift over time.

Proposed solution

Part 1 — Bake front matter into static docs

Add layout: default and title: to each static .md file in documentation/ and
commit. ~40 files. Do the same for ERB templates so generated pages are Jekyll-ready.

Part 2 — Add rake docs:jekyll task

A new task that:

  1. Calls docs:all to render ERB templates
  2. Rewrites all .md cross-reference links to .html — both Markdown-style links and
    raw HTML <a href="..."> attributes — across all files in documentation/
  3. Parses bolt.ditamap and generates a _data/openbolt_nav.yml nav data file that
    openvox-docs can use to render the sidebar, preserving section groupings, page order,
    and navtitles from the DITA map
  4. Writes all output to documentation/jekyll_build/ (leaving the source docs untouched)

All transformation logic stays in openbolt where the docs live. The openvox-docs copy
pipeline becomes: run rake docs:jekyll, copy documentation/jekyll_build/.

Acceptance criteria

  • All static .md files in documentation/ have layout: and title: front matter committed
  • ERB templates generate pages with layout: and title: front matter (no permalink:)
  • bundle exec rake docs:jekyll produces a documentation/jekyll_build/ directory
  • All .md cross-reference links are rewritten to .html (both markdown and HTML href forms)
  • All 9 previously-generated reference pages are present in the output
  • jekyll_build/_data/openbolt_nav.yml is generated from bolt.ditamap, preserving hierarchy and navtitles
  • README Documentation section updated to describe the build task
  • openvox-docs#98 can be re-landed using the task output with zero 404s

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions