-
Notifications
You must be signed in to change notification settings - Fork 434
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ This library is <a href="http://openid.net/certification/#RPs">certified</a> by | |
|
||
You can use the schematics and `ng add` the library. | ||
|
||
``` | ||
```shell | ||
ng add angular-auth-oidc-client | ||
``` | ||
|
||
|
@@ -122,19 +122,24 @@ export class AppComponent implements OnInit { | |
constructor(public oidcSecurityService: OidcSecurityService) {} | ||
|
||
ngOnInit() { | ||
this.oidcSecurityService.checkAuth().subscribe((loginResponse: LoginResponse) => { | ||
const { isAuthenticated, userData, accessToken, idToken, configId } = loginResponse; | ||
|
||
/*...*/ | ||
}); | ||
this.oidcSecurityService | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is prettier doing the formatting, I can revert if needed. |
||
.checkAuth() | ||
.subscribe((loginResponse: LoginResponse) => { | ||
const { isAuthenticated, userData, accessToken, idToken, configId } = | ||
loginResponse; | ||
|
||
/*...*/ | ||
}); | ||
} | ||
|
||
login() { | ||
this.oidcSecurityService.authorize(); | ||
} | ||
|
||
logout() { | ||
this.oidcSecurityService.logoff().subscribe((result) => console.log(result)); | ||
this.oidcSecurityService | ||
.logoff() | ||
.subscribe((result) => console.log(result)); | ||
} | ||
} | ||
``` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. The default parses is now For example, the header in public api You can also verify this using the upgrade checker:
|
||
}, | ||
themeConfig: { | ||
navbar: { | ||
title: 'Angular Auth OIDC Client Docs', | ||
|
@@ -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 commentThe 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. |
||
}, | ||
}, | ||
presets: [ | ||
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Nice catch! |
||
remarkPlugins: [ | ||
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }], | ||
], | ||
showLastUpdateAuthor: true, | ||
showLastUpdateTime: true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Perfect, thanks! |
||
}, | ||
blog: { | ||
showReadingTime: 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.