Skip to content

chore: version api reference docs - #2791

Closed
sean-perkins wants to merge 3 commits into
mainfrom
fix/version-api-docs
Closed

chore: version api reference docs#2791
sean-perkins wants to merge 3 commits into
mainfrom
fix/version-api-docs

Conversation

@sean-perkins

@sean-perkinssean-perkins commented Feb 24, 2023

Copy link
Copy Markdown
Contributor

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

vercelBot commented Feb 24, 2023

Copy link
Copy Markdown

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

NameStatusPreviewCommentsUpdated
ionic-docs✅ Ready (Inspect)Visit Preview💬 Add your feedbackFeb 24, 2023 at 5:47PM (UTC)

Comment threadscripts/api.js
writeAutoGeneratedPage(compTag, 'custom-props', renderCustomProps(comp));
writeAutoGeneratedPage(compTag, 'slots', renderSlots(comp));
});
for (let { npmTag, version } of versions) {

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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 freeto 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

@sean-perkins@liamdebeasi