JustAnyones / Plugin-creator-website

The repository for the 4th version of the plugin creator website for TheoTown.
https://pca.svetikas.lt
MIT License
1 stars 3 forks source link

Rethink documentation of draft attributes #14

Open JustAnyones opened 1 month ago

JustAnyones commented 1 month ago

While the current way of documenting draft attributes works, it lacks functioning inheritance mechanism. Also, at markdown preprocessor level it is not able to specify links to other documents since file location context is not available. It is also slow.

I want to investigate a way in which inheritance and other functionality such as version added could be created without excessive markdown parsing.

Considering it is mostly structured data that is put in attributes, one could instead generate the markdown files from an intermediate format which supports the functionality.

That generated data could then be loaded by using some specific keyword and that's all.

The possible edge cases and how the generation should be done should be investigated, this is stub issue.

JustAnyones commented 2 weeks ago

Idea 1:

<!-- Would replace the :::some-attribute-data with some specific markdown -->
::: attributes-start
# attribute
::: some-attribute-data: ....
...
::: attributes-end

<!-- Would sort the highest headers in scope -->
::: sorted-start
### Header 3
### Header 1
### Header 2
::: sorted-end

Another thing I dislike is running the entire inheritance and parsing shebang every time I update any file while using mkdocs serve.