Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: automate plugin page headings #8

Merged
merged 1 commit into from
May 15, 2024

Conversation

SethFalco
Copy link
Member

Makes two major changes to our documentation.

Now we check the front matter, and determine if we're currently rendering a plugin page and inserts the PluginUsage, PluginParams, and PluginDemo components.

We specified these components in the docs pages themselves before, because Docusaurus won't generate TOC entries from headings in React components. However, we hack around this by inserting them in the TOC component itself if it's a plugin page.

It's a little hacky, but makes the documentation much cleaner and reduces human-error, which has already caused issues in the documentation before.

The other change is that this drops the implementation heading for each plugin, and instead inserts an entry before to the "Edit this page on GitHub" link to "Read the implementation". This is much cleaner.

@SethFalco SethFalco merged commit fd68840 into svg:main May 15, 2024
1 check passed
@SethFalco SethFalco deleted the chore/plugin-headings branch May 15, 2024 19:33
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.

None yet

1 participant