Skip to content

Conversation

Redbot
Copy link
Contributor

@Redbot Redbot commented Apr 13, 2025

Adds macros to embed commands and datatypes into a page, so we don't have to repeat the same information in both index page and sub-page. An example is mq2chatwnd, where information is repeated in the README.md and command pages.

This is a draft pr, with autologin as example. If it looks good, I'll standardize the other core-plugins.

image
image

@brainiac
Copy link
Contributor

I like the idea. The screenshots show the old table based datatype though, we are using a newer layout for them. it will still work that way?

@Redbot
Copy link
Contributor Author

Redbot commented Apr 27, 2025

The table based layout is just for embedded content, to save space. If the user clicks through to the datatype's page, they'll see the new layout.

If you want the new layout for embedded content as well, I can nix render_members_table

@Redbot Redbot marked this pull request as ready for review April 27, 2025 17:02
@Redbot
Copy link
Contributor Author

Redbot commented Apr 27, 2025

Since I was adding other internal plugins, I standardized their naming, dropping the "MQ2" 7f07ccf and updated references to them. e19e820

I added redirects for the index pages in mkdocs.yml, but not each tlo/datatype/command as I thought it would take up too much space.

@Redbot
Copy link
Contributor Author

Redbot commented May 10, 2025

If you don't want to transform embedded content, here's another include method with the include-markdown plugin.

pros:

  • fewer custom functions in main.py
  • everything can be tweaked on the embedding page, making easy fixes for edge cases.
  • mature plugin

cons:

  • makes core-plugin index pages look a bit messy in raw markdown, due to repeated inclusion code. (the repeated inclusion code is begging for a macro, but you can't add include-markdown in main.py, you'd need a custom hook)
  • start/end comments or stricter formatting are needed. I went with comments.

I like this solution more despite the messier raw markdown.

2025-05-10_18-36-52

@Redbot
Copy link
Contributor Author

Redbot commented Sep 4, 2025

ok finally ready, I changed a lot since the first commit. Here are the major points,

  • renamed core-plugins. (dropped MQ2)
  • Standardized format of core-plugin docs
  • added a plugin: mkdocs-include-markdown-plugin
    • added comments to nearly every .md file for the sake of the include plugin
    • added a "read more" button macro to main.py, and call it with each include.
  • Pages that duplicated content (framelimiter feature, pages with associated datatypes) now use include-markdown instead. (No changes to appearance.)
  • Added indexes for core plugins, commands, tlo and datatype sections.
  • Added some missing commands, datatypes, TLOs
  • Lots of fixes for typos, bad links, workflow, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants