-
Notifications
You must be signed in to change notification settings - Fork 83
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
Support for loading custom Markdown files #193
Support for loading custom Markdown files #193
Conversation
✅ Deploy Preview for docusaurus-openapi ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Is this ready for review? |
@bourdakos1 It is ready, I am just making some minor linting fixes |
It will probably take me a few days to review this, but I’m excited for the update 😁 |
@@ -0,0 +1,223 @@ | |||
/* ============================================================================ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to keep the original license headers. You may need to update eslint to allow different headers for these files. I think we also need to update this project’s license to include the original copy from Docusaurus’ license
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may also be worth reaching out to Docusaurus and ask if they could expose all this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bourdakos1 It's a bit complicated because I had to remove all the logic that had to do with versions, which we don't support. So they would have to do some large changes to be able to export this in a way that is generic enough for us.
For now, I clarified that these files are taken and adapted from upstream. I also updated the license headers.
fixed a bug where the slug property wasn't properly recognized |
The "My Custom Petstore" / "My Intro" page doesn't load for me |
My bad, I forgot to push stuff. Could you try it again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work! Sorry it took so long to review, this was just a big change and I wanted to be thorough. I think this will have one small issue where the custom markdown pages won’t be seen by the “next”/“previous” page buttons. However, we can look into fixing that later.
Thanks again, I really appreciate all the work you’ve put into this ❤️❤️❤️
Great feature! Do you have plans to release a new version of the package on npm? I'm interested using this feature too :) Thank you! |
This PR adds the following features:
_spec_.{yaml,yml,json}
files, which do not generate a new category_category_
or front matter in custom mdx filesSolves:
_spec_
, but we can change this)Example
File tree (notice
examples/custom-overview.md
,examples/petstore/_spec_.yaml
,examples/petstore/my-intro.md
):Results:
@bourdakos1 I would love your review on this.
There are a lot of changes in the diff, but most of the stuff (the one in
packages/docusaurus-plugin-openapi/src/docs/
) has been taken and "tree-shaked" from the originalplugin-content-docs
plugin (they don't export those functions, unfortunately).