-
Notifications
You must be signed in to change notification settings - Fork 435
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
infra: update docs to docusaurus v3 #1864
infra: update docs to docusaurus v3 #1864
Conversation
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.
Some more info about the upgrade can be found in the comments
@@ -22,7 +22,7 @@ jobs: | |||
- name: Setup Node.js | |||
uses: actions/setup-node@v1 | |||
with: | |||
node-version: 16.16.0 | |||
node-version: 18 |
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.
README.md
Outdated
|
||
/*...*/ | ||
}); | ||
this.oidcSecurityService |
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.
This is prettier doing the formatting, I can revert if needed.
@@ -12,6 +12,9 @@ module.exports = { | |||
favicon: 'img/favicon.ico', | |||
organizationName: 'damienbod', // Usually your GitHub org/user name. | |||
projectName: 'Angular Auth OIDC Client', // Usually your repo name. | |||
markdown: { | |||
format: 'md', |
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 default parses is now mdx2
, due to this many compile errors are thrown.
Because we don't make use of it, I changed the default parser to just markdown
.
For example, the header in public api forceRefreshSession(customParams?: { ... }, configId?: string)
throws an error because it tries to parse the code between the brackets { ... }
, because it thinks that this is a JSX block.
You can also verify this using the upgrade checker:
npx docusaurus-mdx-checker
@@ -71,7 +74,7 @@ module.exports = { | |||
copyright: `Copyright © ${new Date().getFullYear()} Angular Auth OIDC Client Docs, Inc. Built with Docusaurus.`, | |||
}, | |||
prism: { | |||
additionalLanguages: ['typescript'], | |||
additionalLanguages: ['typescript', 'bash', 'json'], |
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.
v3 removes some default languages. I added the ones that were used in the docs.
@@ -81,7 +84,13 @@ module.exports = { | |||
docs: { | |||
sidebarPath: require.resolve('./sidebars.js'), | |||
// Please change this to your repo. | |||
editUrl: 'https://github.com/damienbod/angular-auth-oidc-client', | |||
editUrl: | |||
'https://github.com/damienbod/angular-auth-oidc-client/edit/main/docs/site/angular-auth-oidc-client', |
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.
I noticed the current edit functionally redirects the user to a 404, e.g. https://github.com/damienbod/angular-auth-oidc-client/docs/documentation/public-api.md
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.
Nice catch!
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }], | ||
], | ||
showLastUpdateAuthor: true, | ||
showLastUpdateTime: true, |
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.
Because I find it useful, I can also revert this if you want
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.
Perfect, thanks!
Thanks @timdeschryver ! LGTM. Merge, okay? |
Ship it @FabianGosebrink 🚀 |
@FabianGosebrink it seems as the build on |
No worries. Ping me if you need help. Thank you for all your effort. We really appreciate it! |
Thanks! |
I recently did this for Testing Library, and noticed that the docs could be upgraded to docusaurus v3.
Feel free to close if the docs should remain on v2, or if you want to upgrade later.
For more info see https://docusaurus.io/blog/releases/3.0