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

feat(gatsby-theme-docz): include MDX transclusion support #1436

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

Palmaswell
Copy link
Contributor

@Palmaswell Palmaswell commented Mar 30, 2020

Description

The current gatsby-theme-docz version does not support MDX document transclusion. On the same token, trying to import an MDX document into a page and consume it as a component would throw an error. The thrown error causes the application to break as a side effect.

In this pull request, I solved this error issue and extended the functionality in the base/Layout.js by filtering pages and embedded MDX components.

Document transclusion is a very useful and powerful feature for anyone documenting components and APIs. I hope this pull request can be included in the Docz project. Please let me know if you have any questions or need more information.

@Palmaswell Palmaswell changed the title feat(gatsby-theme-docz): include MDX transclusion support in theme feat(gatsby-theme-docz): include MDX transclusion support in Gatsby theme Mar 30, 2020
@Palmaswell Palmaswell changed the title feat(gatsby-theme-docz): include MDX transclusion support in Gatsby theme feat(gatsby-theme-docz): include MDX transclusion support Mar 30, 2020
@rakannimer
Copy link
Contributor

Nice, this is very clever. Any chance you can also add an example in examples to show how to use this ?

Thanks !

@rakannimer rakannimer merged commit 435001a into doczjs:master Mar 31, 2020
@Palmaswell
Copy link
Contributor Author

Hi @rakannimer 👋,

Glad to hear you like my suggestion. I can definitely create an example.

What do you consider to be wiser?

  1. Extend the current with-gatsby-theme-docz example
    or
  2. Create a new example focusing on document transclusion in the gatsby-theme-docz?
    Looking forward to hearing your ideas.

@rakannimer
Copy link
Contributor

Heyo !

I think I prefer option 2, it would be better to have it in a separate simpler example focusing on this feature only.

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