devdocs
devdocs copied to clipboard
Cleaner HTML
Ideally, scraped docs would have minimal HTML. However, several docs currently have classes and wrapper elements. There should be a check that can be run after docs are scraped that looks for elements with a class or other non-id attribute that isn’t referenced by a CSS selector, as well as non-semantic elements with no attributes that are not referenced in the CSS. Then, someone should go through all of the docs to find and eliminate the excess markup. This will most likely result in a decrease in the size of downloaded docs bundles.
- [ ] create linter
- [ ] lint & fix the docs (maybe only do this when updating a doc for other reasons)
Shouldn’t a filter do that for all docs ideally ? There’s already a bit of that done, with empty spans removed if I’m not mistaken. That way the doc-specific cleaning is limited to removing non-meaningful content.
There are still places in the docs where classes are necessary to fix styling. Also, I assume most sites would use fairly clean markup inside of the actual doc contents, with most of the CSS noise being for things like navigation separate from the regular content.