whatwg / html-build

Build scripts for https://github.com/whatwg/html
Other
62 stars 62 forks source link

Automatically generate bibliography entries #293

Open domenic opened 5 months ago

domenic commented 5 months ago

Right now HTML hand-curates its bibliography entries by adding HTML directly in the following format towards the end of the document.

  <dl id="ref-list">
   <dt id="refsABNF">[ABNF]</dt>
   <dd><cite><a href="https://www.rfc-editor.org/rfc/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a></cite>, D. Crocker, P. Overell. IETF.</dd>

   <dt id="refsABOUT">[ABOUT]</dt>
   <dd><cite><a href="https://www.rfc-editor.org/rfc/rfc6694">The 'about' URI scheme</a></cite>, S. Moonesamy. IETF.</dd>

   <dt id="refsAPNG">[APNG]</dt>
   <dd>(Non-normative) <cite><a href="https://wiki.mozilla.org/APNG_Specification">APNG Specification</a></cite>. S. Parmenter, V. Vukicevic, A. Smith. Mozilla.</dd>

This is annoying to maintain and the results are inconsistent with the rest of the spec ecosystem.

A north-star goal would be to move toward the same system as Bikeshed. We scan the document for [[FOO]] or [[!FOO]], and this combines to generate a full bibliography, based on https://www.specref.org/ data.

This would be a bit hard for a few reasons:

Here's my proposal for an incremental approach which significantly eases the maintenance burden:

The result would require us to maintain a <dl id="ref-list"> which looks more like this:

  <dl id="ref-list">
   <dt>[ABNF]</dt>

   <dt>[RFC6694]</dt>

   <dt nonnormative>[APNG]</dt>

   <dt>[BEZIER]</dt>
   <dd><cite>Courbes &agrave; poles</cite>, P. de Casteljau. INPI, 1959.</dd>

This could all be done as part of the Rust pre-processor steps, so that Wattsi sees the same document that it's currently seeing.