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

Move docs node generation to a local plugin #3113

Merged
merged 4 commits into from
Dec 23, 2021

Conversation

rogermparent
Copy link
Contributor

@rogermparent rogermparent commented Dec 18, 2021

This PR is a first step in porting our docs engine into a reusable Gatsby theme. It moves all the files from our docs Gatsby Model to a new local plugin at plugins/gatsby-theme-iterative-docs.

From here, we can continue to move more parts of our docs engine (sidebar, components) to this plugin directory. Once we have everything moved and ensure it still works, we can turn the local plugin folder into its own node module and start work on reintegrating it with the other sites.

@shcheklein shcheklein temporarily deployed to dvc-org-docs-gatsby-nod-dqjul0 December 18, 2021 06:36 Inactive
Copy link
Contributor

@julieg18 julieg18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @rogermparent! Just one small question :)

gatsby-config.js Outdated
{
resolve: 'gatsby-theme-iterative-docs',
options: {
docComponent: require.resolve('./src/templates/doc.tsx'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the docComponent being used in the theme? I'm not seeing it being used anywhere 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! I renamed this to defaultTemplate in createPages but didn't end up updating it here.

@rogermparent rogermparent temporarily deployed to dvc-org-docs-gatsby-nod-dqjul0 December 20, 2021 23:36 Inactive
Copy link
Contributor

@yathomasi yathomasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good @rogermparent .

@rogermparent rogermparent temporarily deployed to dvc-org-docs-gatsby-nod-dqjul0 December 23, 2021 20:32 Inactive
@rogermparent rogermparent temporarily deployed to dvc-org-docs-gatsby-nod-dqjul0 December 23, 2021 20:35 Inactive
@rogermparent rogermparent merged commit 001205c into master Dec 23, 2021
@rogermparent rogermparent deleted the docs-gatsby-node-plugin branch December 23, 2021 20:42
iesahin pushed a commit that referenced this pull request Apr 11, 2022
* Move docs node generation to a local plugin

* Use pluginOptionsSchema API for defaults

* Remove unused import
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.

4 participants