freeCodeCamp / freeCodeCamp/devdocs
Cleaner HTML
- 主要语言
- Ruby
- 星标
- 39.5k
- 派生
- 2.6k
- 平均合并
- 4 天 32 分钟
- 30 天内合并 PR
- 13
描述
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)
贡献指南
调研方向
Start by tracing where scraped HTML is produced and where the documentation CSS selectors are defined. Build the requested post-scrape check around unused classes, non-id attributes, and non-semantic attribute-free elements, then run it across the docs and remove the reported excess markup. Done means the linter works and the docs pass it.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- css, html, ruby
- 领域
- documentation, tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100