RFR: Split up the monolithic index.md, take two [v2]

Jesper Wilhelmsson jwilhelm at openjdk.java.net
Thu May 12 15:15:19 UTC 2022


On Thu, 12 May 2022 14:11:06 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> Here's a resurrection of my old code to split up the monolithic index.md.
>> 
>> I have fully recreated the per-chapter files based on the current content of index.md. I have removed the number prefix and instead the order of the files are determined by `src/toc.conf`.
>> 
>> By my quick inspection, the generated index.html looks identical to the one before.
>> 
>> I found some inconsistencies when doing this. For instance most, but not all, chapters end with a 
>> 
>> ::: {.box}
>> [To the top](#){.boxheader}
>> :::
>> 
>> footer. A reasonable follow-up is to move these per-chapter footers out of the actual markdown, and inject them when combining the file instead. This means less redundancy, and no more inconsistencies. ;-)
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
> 
>   If the TOC does not match reality, fail with a build error

Thanks for doing this Magnus! Looks good!

Makefile line 12:

> 10: LEGACY_MD := $(wildcard src/*.md)
> 11: LEGACY_FOOTER := $(patsubst src/%.md, build/support/footers/%.html, $(LEGACY_MD))
> 12: LEGACY_RESULT := $(patsubst src/%.md, build/dist/%.html, $(LEGACY_MD))

Why legacy?

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

Marked as reviewed by jwilhelm (Lead).

PR: https://git.openjdk.java.net/guide/pull/82


More information about the guide-dev mailing list