catalog icon indicating copy to clipboard operation
catalog copied to clipboard

Add Project: mkdocs-tablestrip

Open SaltyAimbOtter opened this issue 1 year ago • 3 comments

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.md file. Projects are only supposed to be added or updated within the projects.yaml file since the README.md file is automatically generated.

SaltyAimbOtter avatar Aug 17 '24 19:08 SaltyAimbOtter

See https://github.com/mkdocs/catalog/pull/248#issuecomment-2295207569 for why CI is failing.

pawamoy avatar Aug 18 '24 10:08 pawamoy

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:?

pawamoy avatar Aug 18 '24 10:08 pawamoy

@SaltyAimbOtter still interested in these PRs? :slightly_smiling_face:

pawamoy avatar Oct 10 '24 19:10 pawamoy