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

First POC to generate doc from code. #2893

Merged
merged 14 commits into from
Aug 27, 2024
Merged

First POC to generate doc from code. #2893

merged 14 commits into from
Aug 27, 2024

Conversation

romain-growthbook
Copy link
Contributor

This PR adds the first POC to generate doc content from the code.

One thing that could be enhanced is the doc generation hook-up. I couldn't find a notion of dependency/generated files directly in the docusaurus build pipeline.

@romain-growthbook romain-growthbook force-pushed the new-events-doc branch 2 times, most recently from 930b1e4 to 641f8fc Compare August 19, 2024 14:26
Copy link

github-actions bot commented Aug 19, 2024

Deploy preview for docs ready!

✅ Preview
https://docs-nj1genbyd-growthbook.vercel.app

Built with commit e740944.
This pull request is being automatically deployed with vercel-action

@royalfig
Copy link
Contributor

royalfig commented Aug 19, 2024

This is looking good!

It's possible (and probably preferable) to import the markdown without the plugin, docusaurus-plugin-includes.

The docs make it seem like you could do this anywhere, but I got it to work like this:

  • Add the generated md file to /src/partials/
  • Import the file in the Events file and use it as a component:
import EventWebhookList from "@site/src/partials/_event-webhook-list.md"

<EventWebhookList />

@romain-growthbook
Copy link
Contributor Author

This is looking good!

It's possible (and probably preferable) to import the markdown without the plugin, docusaurus-plugin-includes.

The docs make it seem like you could do this anywhere, but I got it to work like this:

  • Add the generated md file to /src/partials/
  • Import the file in the Events file and use it as a component:
import EventWebhookList from "@site/src/partials/_event-webhook-list.md"

<EventWebhookList />

Thanks, this is done now!

@romain-growthbook romain-growthbook force-pushed the new-events-doc branch 2 times, most recently from d106a3a to 9d10c3f Compare August 20, 2024 15:27
Base automatically changed from new-events to main August 21, 2024 15:12
Copy link

Your preview environment pr-2893-bttf has been deployed.

Preview environment endpoints are available at:

@romain-growthbook romain-growthbook merged commit b078f91 into main Aug 27, 2024
6 checks passed
@romain-growthbook romain-growthbook deleted the new-events-doc branch August 27, 2024 16:57
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.

3 participants