catalog
catalog copied to clipboard
Add Project: mkdocs-tablestrip
What kind of change does this PR introduce?
- [X] Add a project
- [ ] Update a project
- [ ] Remove a project
- [ ] Add or update a category
- [ ] Change configuration
- [ ] Documentation
- [ ] Other, please describe:
Description:
I added the project mkdocs-tablestrip that strips certain table rows from the generated HTML.
Checklist:
- X ] I have read the CONTRIBUTING guidelines.
- [X] I have not modified the
README.mdfile. Projects are only supposed to be added or updated within theprojects.yamlfile since theREADME.mdfile is automatically generated.
See https://github.com/mkdocs/catalog/pull/248#issuecomment-2295207569 for why CI is failing.
Quick comments on the plugin:
- I noticed it uses BeautifulSoup to parse the HTML, modify it, and re-dump it. This is highly inefficient in a MkDocs setup (not blaming anyone, it's just how it is). The efficient way of doing this is with a Markdown extension that operates on the HTML (converted from Markdown) directly, to avoid re-parsing and re-dumping by each plugin. It would use a TreeProcessor (I'll let you look at their docs if you're interested in the switch). Note that a Markdown extension would only work on hard-coded tables, or tables generated by other Markdown extensions, but not table generated by other MkDocs plugins, so the switch might not be possible depending on your use-case.
- Your README mentions removing rows of tables, but after reading the code, to me it looks like it removes columns corresponding to the keyword you specify, not rows: it removes the corresponding cell from the table headers, and the cells at the same index from all rows. So it effectively removes the column (vertical). Or did I misunderstand :relaxed:?
@SaltyAimbOtter still interested in these PRs? :slightly_smiling_face: