website: hardcode url for disqus comments

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-01-24 19:26:04 +01:00
parent 7cfd84d8f0
commit 8564f9ef87
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ function BlogPostPageContent({ sidebar, children }) {
} }
export default function BlogPostPage(props) { export default function BlogPostPage(props) {
const BlogPostContent = props.content; const BlogPostContent = props.content;
const title = props.content.frontMatter.title; const title = props.content.frontMatter.title.substring(0, 200);
const fmtId = title.replace(/^\//, "").replaceAll(/[\s\/]/gi, "-"); const fmtId = title.replace(/^\//, "").replaceAll(/[\s\/]/gi, "-");
const disqusId = fmtId == "" ? "main" : fmtId; const disqusId = fmtId == "" ? "main" : fmtId;
return ( return (
@ -64,7 +64,7 @@ export default function BlogPostPage(props) {
<DiscussionEmbed <DiscussionEmbed
shortname="goauthentik-io" shortname="goauthentik-io"
config={{ config={{
url: props.siteUrl + props.route.path, url: "https://goauthentik.io" + props.route.path,
identifier: disqusId, identifier: disqusId,
title: title, title: title,
}} }}