mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.18k stars 501 forks source link

Automatically insert "Specifications" and "Browser compatibility" sections into relevant pages #6390

Open bershanskiy opened 2 years ago

bershanskiy commented 2 years ago

Most pages have the following at the end:

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

these are trivial includes that can be appended automatically to the end of the document unless there is an explicit section that has the same title but different content.

wbamberg commented 2 years ago

See also https://github.com/mdn/yari/pull/5971. As I said there, I'm a bit uncomfortable with things like "the ordering and placement of BCD and spec tables" being hardcoded deep inside some Yari magic.

It would be great eventually to make these macros obsolete but I would prefer there to be a human readable (and human-editable) description of a page format that determines what gets included in the page in what order, and Yari follows that order.

teoli2003 commented 2 years ago

Yes, I second this. I would prefer Yari to use the new page-type YAML entry combined with some kind of template associated with it to enforce this.

What is displayed on a page (sections, titles, sidebars, …) is essentially a content decision. That's why we moved GroupData.json from Yari to the mdn/content repo last year (even if this won't be the final way of defining sidebars).