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

Support docs & components from source directory & dependencies #1317

Closed
3 tasks done
axe312ger opened this issue Dec 12, 2019 · 3 comments
Closed
3 tasks done

Support docs & components from source directory & dependencies #1317

axe312ger opened this issue Dec 12, 2019 · 3 comments
Labels
enhancement pending-release Issue fixed but not published to npm yet stale

Comments

@axe312ger
Copy link
Contributor

axe312ger commented Dec 12, 2019

Situation

I am working on a set of components which can be easily reused over several Gatsby projects. Additionally I create project specific components.

To provide a proper documentation to the team of other devs & editors, I want to display documentation from my project specific components plus the ones I included from the (community) repositories.

Solution

With these 3 pull requests, my use case would be fully covered:

Todo

The naming of the customPattern should probably be changed to a more clear name 🤔

The code for sure is not bullet proof yet, it also needs some documentation. I also found several other configuration options within docz-core which are not yet reflected on the website. We could tackle these as well :)

Would love to see this integrated, I am very open to feedback to my PRs.

👋

Example

With all PRs applied and the config below I can support components and docs from normal projects and mono/lerna/yarn workspace repositories as well.

{
  resolve: `gatsby-theme-docz`,
  options: {
    files: [
      `src/components/mdx/**/docs/*.{md,markdown,mdx}`,
      `node_modules/@gatsby-mdx-suite/*/docs/*.{md,markdown,mdx}`,
      `../../node_modules/@gatsby-mdx-suite/*/docs/*.{md,markdown,mdx}`,
    ],
    customPattern: [
      `src/components/mdx/**/*.{js,jsx,mjs}`,
      `node_modules/@gatsby-mdx-suite/**/*.{js,jsx,mjs}`,
      `../../node_modules/@gatsby-mdx-suite/**/*.{js,jsx,mjs}`,
    ],
  },
}
@rakannimer
Copy link
Contributor

Thank you for the PRs, I'm sure many people will find them very useful 👍

I merged #1315 and added minor reviews for #1314 and #1316.

Regarding the docs, if you agree with me and we go with docgenConfig.searchPatterns than we could add docs for the complete docgenConfig object in docz.site (https://github.com/doczjs/docz-website)

I opened an issue there to track the progress : doczjs/docz-website#90

@rakannimer rakannimer added enhancement pending-release Issue fixed but not published to npm yet labels Dec 16, 2019
@axe312ger
Copy link
Contributor Author

working now for me in alpha, will report back if issues arise. Thx for the alpha release! :)

@stale
Copy link

stale bot commented Mar 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 24, 2020
@stale stale bot closed this as completed Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pending-release Issue fixed but not published to npm yet stale
Projects
None yet
Development

No branches or pull requests

2 participants