-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
web: Client-side MDX rendering #13610
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for authentik-docs canceled.
|
8ecc05a
to
442c344
Compare
await Promise.allSettled( | ||
return Promise.all( |
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.
Fixes issue where build errors are swallowed during compile.
prefix: "mermaid-svg-", | ||
colorScheme: this.activeTheme === UiThemeEnum.Dark ? "dark" : "light", | ||
} satisfies RehypeMermaidOptions, |
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.
Mermaid's support for dynamic theming is a mess and doesn't handle non-hex code colors all that well. This needs revising when branding becomes more precise.
const { default: Content, ...mdxExports } = await runMDX(mdx, { | ||
...runtime, | ||
baseUrl: import.meta.url, | ||
}); |
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.
Like our previous rendering with Showdown, this assumes trusted authorship of content. Blueprints may require another remark plugin to sanitize the HTML.
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #13610 +/- ##
==========================================
+ Coverage 92.74% 92.76% +0.01%
==========================================
Files 794 794
Lines 40502 40502
==========================================
+ Hits 37565 37570 +5
+ Misses 2937 2932 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-57c3c995259b881b0f6872e3b1e45f03aba555ae
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s Afterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-57c3c995259b881b0f6872e3b1e45f03aba555ae Afterwards, run the upgrade commands from the latest release notes. |
Signed-off-by: Teffen Ellis <[email protected]>
Signed-off-by: Jens Langhammer <[email protected]>
f9ea3eb
to
4e62889
Compare
Details
This PR migrates much of the inline documentation MDX rendering to the browser, allowing for a faster build time, the removal of a Chromium as a dependency (via Mermaid), and support for hydrated components (such as Docusaurus style tabs).
Also included is the splitting of inline documentation from ESBuild's core bundle, which should offset the inclusion of MDX's render pipeline.
Checklist
ak test authentik/
)make lint-fix
)If an API change has been made
make gen-build
)If changes to the frontend have been made
make web
)If applicable
make website
)