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

New docs with monorepo support #1588

Merged
merged 7 commits into from
Mar 10, 2025
Merged

New docs with monorepo support #1588

merged 7 commits into from
Mar 10, 2025

Conversation

0b5vr
Copy link
Contributor

@0b5vr 0b5vr commented Mar 5, 2025

This PR introduces the new docs page with the monorepo support.

image

Existing docs for each package still exist and can be generated by running the docs-legacy command. These docs redirect to the new URL.
It consumes a long time to generate. We might want to remove it in the future.

Also, existing /docs/ in the root level is moved to /guides/.

See details for the each commit.

0b5vr added 5 commits March 5, 2025 17:58
to place typedoc on the root level
existing docs commands still exist as `docs-legacy` in order to preserve the exising URLs
I will try to redirect them in the next commit

Set `name` for each packages' `typedoc.json` to make their URL not being like `_pixiv_three-vrm`

`/guides/README.md` is removed since it appears as "README" on the docs menu and it doesn't make sense

Also updated the inspect.yml to build and publish both old and new docs
I have 20% confidence this ci will work on the first try
also `yarn clean` now cleans the root `docs/`
@0b5vr 0b5vr added the documentation Improvements or additions to documentation label Mar 5, 2025
@0b5vr 0b5vr requested a review from yue4u March 5, 2025 11:34
@0b5vr 0b5vr self-assigned this Mar 5, 2025
Copy link
Contributor

@yue4u yue4u left a comment

Choose a reason for hiding this comment

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

IMO the new doc is much better and keeping redirects is good!

const matchItems = path.match(/packages\/(.+)\/docs\/(classes|interfaces|functions|types|variables)\/(.+)/);
if (matchItems != null) {
const [_, packageName, kind, item] = matchItems;
return `../../../docs/${kind}/${packageName}.${item}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

The relative path ../../../ does not work for nested docs like /packages/three-vrm/docs/variables/VRMExpressionMaterialColorType-1.html. Maybe using /docs/ is better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops that's true. will change it to simply use /docs/....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no that wouldn't work because the document root will be https://pixiv.github.io/three-vrm/docs/ on GitHub Pages. I would try setting the document root using environment variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

make it use an environment variable DOCS_ROOT.

8f9f9ae

the previous redirect using the relative path does not work when the page is nested
Use `DOCS_ROOT` environment variable to specify the correct absolute path

#1588 (comment)
Copy link
Contributor

@yue4u yue4u left a comment

Choose a reason for hiding this comment

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

LGTM

@0b5vr 0b5vr merged commit 6b9365f into dev Mar 10, 2025
6 checks passed
@0b5vr 0b5vr deleted the new-docs branch March 10, 2025 06:29
@0b5vr 0b5vr added this to the next milestone Mar 10, 2025
0b5vr added a commit that referenced this pull request Mar 10, 2025
We have updated the docs structure in the previous PR: #1588
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants