Replies: 3 comments 4 replies
-
Both mdn/data and non-bcd info in mdn/browser-compat-data were added before the YAML header era. For new structured data that can't be inferred from other sources (bcd or webref, for example), I think we should put them in the YAML header of the page. Do we want to move existing data (like the one in mdn/data) to the MDN page header? As you said, this would ease contribution and make it clear where the data is. |
Beta Was this translation helpful? Give feedback.
-
Not much to add.
W.r.t. BCD vs front matter info my (probably unpopular) leaning is that BCD should be a master copy. Mostly because:
I think we should get the data from BCD where we can and otherwise use front matter keys. If there is a conflict, the front matter keys should win. I think that the end result will be a relatively small number of cases where users need to think about things like deprecation and so on. |
Beta Was this translation helpful? Give feedback.
-
I agree with @hamishwillee here:
I sort of see 'is the data to do with the page' ie title, slug, page-type - should be in frontmatter, 'is the data to do with the spec' - should come from webref/bcd - this isn't a perfect science however because @wbamberg rightly points out we have out lying pages (like web api landing pages) - with this though I wonder whether the work @ddbeck is doing on grouping web features might be useful (in the long run) https://github.com/ddbeck/common-web-feature-mockup/tree/main/web-platform-features |
Beta Was this translation helpful? Give feedback.
-
We have a discussion thread about what kind of metadata we want to have for MDN pages. This one is about where we should represent it.
As we talk more about adding metadata to MDN, and using it more to build bits of the page, one question comes up: should we keep it in the page front matter or in BCD?
Right now we have some in BCD:
...and some in front matter:
We're also talking about adding more metadata, although some of this could be sourced from the IDL via webref, including things like:
Should these things live in page front matter or in BCD?
First, for items that can be found in webref/idl, I think we should use that. Otherwise we're just making our own copy of the data, asd we used to do for CSS formal syntax.
For items that can't be found in webref/idl, I think we should prefer front matter, unless the data is complex and long (like browser compat data itself).
Reasons for this:
spec_urls
, for instance, which can now live in either place. This is quite bad, because it's very confusing for contributors, and it's not clear what does or should happen when the thing exists in both places (forspec_urls
, I believe that both entries get rendered, even if they are the same). This also cause problems if we want to use spec URLs to look up data in webref/idl. When there are two, which one do we use?I think when the data is inherently quite complex and long it is better to keep it out of the front matter. For example, it would be bad to have the compat data itself in front matter.
Beta Was this translation helpful? Give feedback.
All reactions