Sprints: U - Ensure all CSS pages map to a recipe

Created on 28 Apr 2020  路  5Comments  路  Source: mdn/sprints

User story

As part of linting CSS documentation against recipes, we need to make sure that exactly one recipe can be associated with every CSS page.

Acceptance criteria

  • [ ] The linter reports no "file-require-recipe" errors when run over our CSS pages
CSS

Most helpful comment

I've deleted those 2 Index pages, and added a new "css-keyword" recipe (https://github.com/mdn/stumptown-content/pull/508) and with those changes the linter reports 0 "Recipe missing" errors.

All 5 comments

I've spent today tagging pages under CSS so the linter recognises them.

I found that Kuma converts tag values to match the case of existing tags: I filed https://github.com/mdn/stumptown-content/pull/506 to make the linter ignore case. Maybe there's a better approach to this problem.

I've just tagged landing pages as "Guide", since it seems like we're not dealing with landing pages for now.

There are still 6 pages that the linter can't recognize, that we can split into two groups:

Index pages:

https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/Index
https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/@media/Index

For the JS docs there was a lot of discussion about index pages (see https://github.com/mdn/sprints/issues/2785). I believe that in the end we broke the dependency between doc status and index pages in https://github.com/mdn/kumascript/pull/1341, and the deleted the JS index pages. I think this also works to allow us to just delete these CSS index pages.

Keyword pages

https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/inherit
https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/initial
https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/revert
https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/unset

I think this is a new page type and needs a new recipe, "css-keyword.yaml". Looking at the pages, I would define a recipe like:

data:
  - title
  - short_title?
  - mdn_url
body:
  - prose.short_description
  - prose.description?
  - prose.*
  - data.examples
  - data.specifications
  - data.browser_compatibility
  - prose.see_also

Opinions, @Elchi3 , @ddbeck , @chrisdavidmills ?

I don't have anything to suggest. My first instinct was that the new recipe was a bit too special a case. But BCD categorizes the keywords as subfeatures of a CSS type, which suggests that it's a similar problem鈥擨'm fine with deferring both for now.

I'm also not thrilled about having a new recipe for four pages and would be OK with using css-data-type, although it would be technically wrong to do this as far as I know.

I think this also works to allow us to just delete these CSS index pages.

Yes, we ripped this out of Kumascript afaik, so that we can burn all index pages (although, I'm afraid, some sidebars might still reference them). Go for it and delete. Happy to review KS adjustments if they are needed.

I've deleted those 2 Index pages, and added a new "css-keyword" recipe (https://github.com/mdn/stumptown-content/pull/508) and with those changes the linter reports 0 "Recipe missing" errors.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Elchi3 picture Elchi3  路  8Comments

EduardoPazz picture EduardoPazz  路  3Comments

krankj picture krankj  路  3Comments

Elchi3 picture Elchi3  路  7Comments

wbamberg picture wbamberg  路  6Comments