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

chore: version api reference docs #2791

Closed
wants to merge 3 commits into from
Closed

Conversation

sean-perkins
Copy link
Contributor

@sean-perkins sean-perkins commented Feb 24, 2023

Updates the API script to version component API reference information into versioned subdirectories, so that the main markdown source files can import the correct version.

e.g.: v6 docs for components now reference v6 APIs and v7 docs for components now reference the next tag (or v7) APIs.

Issue: FW-3411

@vercel
Copy link

vercel bot commented Feb 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
ionic-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 24, 2023 at 5:47PM (UTC)

writeAutoGeneratedPage(compTag, 'custom-props', renderCustomProps(comp));
writeAutoGeneratedPage(compTag, 'slots', renderSlots(comp));
});
for (let { npmTag, version } of versions) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this file runs for each docusaurus version. Does this mean that it's going to re-generate v6 APIs twice and then v7 APIs twice?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was hoping there was a way to pass the version in the command line so that it naturally works with docusaurus versions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This script runs once, before the docusaurus build starts. The docusaurus build process includes all versions. For example when you run docusaurus build, it is statically building the markdown contents for the latest version and all legacy versions to HTML (this is why the build for static sites takes longer and longer with each version you add).

If we are wanting these files to be co-located within the versioned_docs folder, I can make that change 👍 it will just write to the versioned folder directory and use a relative path for importing, instead of using the alias path.

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