RFR: JDK-8325004: Support a "table-of-contents" for some Markdown spec docs

Jonathan Gibbons jjg at openjdk.org
Wed Jan 31 00:53:52 UTC 2024


Please review a small change, at least as a "proof of concept", to allow customized options to be given to `pandoc` based on the module and filename for a spec.

The goal is to allow a Markdown spec file to have an auto-generated table-of-contents, by including the `--toc` option when running pandoc for specific documents.

There may be better ways to achieve this goal; while I have a working knowledge of this makefile, I'm not an expert. In particular, I tried to find a way to defer the evaluation of the option, so that the declaration of the value did not have to appear before its use in the macros.  But I could only get it to work as presented here.

No other support for a TOC is needed, since we already generate TOCs for other pages, like tool guides (man pages.)

-------------

Commit messages:
 - JDK-8325004: Support a "table-of-contents" for some Markdown spec docs

Changes: https://git.openjdk.org/jdk/pull/17642/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17642&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8325004
  Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/17642.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17642/head:pull/17642

PR: https://git.openjdk.org/jdk/pull/17642


More information about the build-dev mailing list