-
Notifications
You must be signed in to change notification settings - Fork 121
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
Conversation
to place typedoc on the root level
…and LICENSE was broken. fixed this
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
used typedoc plugin. Referred the existing redirect plugin See: https://github.com/Gerrit0/typedoc-plugin-redirect/blob/main/src/plugin.ts
also `yarn clean` now cleans the root `docs/`
There was a problem hiding this 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}`; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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/...
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We have updated the docs structure in the previous PR: #1588
This PR introduces the new docs page with the monorepo support.
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.