Skip to content

Conversation

@mikemimik
Copy link

@mikemimik mikemimik commented Nov 8, 2025

Description

Motivation and Context

How Has This Been Tested?

  • Manually tested using the demo/ package
    • Added example usage to the configuration

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

- update intro page with section on template generators
- add sections on template generators
- fix typo in schema template
- update typo in template docs
- fixed property name typo
@mikemimik mikemimik marked this pull request as ready for review November 8, 2025 22:25
@sserrata sserrata closed this Dec 17, 2025
@sserrata sserrata reopened this Dec 17, 2025
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 4644633):

https://docusaurus-openapi-36b86--pr1244-bu0qur03.web.app

(expires Fri, 16 Jan 2026 17:41:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

@sserrata
Copy link
Member

Thanks @mikemimik!

Questions:

Would it make sense to rename createIntroTemplateMDcreateApiTemplateMD? I imagine this is for API endpoint pages, not intro pages and createApiTemplateMD might align better with markdownGenerators.createApiPageMD.

Could you clarify when to use templateGenerators vs markdownGenerators?

  • templateGenerators → controls frontmatter/wrapper (mustache template, no args)
  • markdownGenerators → controls body content (receives pageData)

Use markdownGenerators to:

  • Add/remove/reorder page sections
  • Use different React components
  • Add custom content based on the OpenAPI spec
  • Skip certain details (e.g., hide callbacks)

Use templateGenerators to:

  • Add custom frontmatter fields
  • Change sidebar labels or positions
  • Add MDX wrapper imports
  • Modify page-level metadata

Limited flexibility: Template generators take no arguments, so they can only return static templates. Was this intentional? Could passing context be useful for dynamic frontmatter?

@sserrata sserrata self-assigned this Dec 17, 2025
@sserrata sserrata added the reviewing 👀 Undergoing manual audit to determine if issue should still be active label Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewing 👀 Undergoing manual audit to determine if issue should still be active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants