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) {
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 disqusId = fmtId == "" ? "main" : fmtId;
return (
@ -64,7 +64,7 @@ export default function BlogPostPage(props) {
<DiscussionEmbed
shortname="goauthentik-io"
config={{
url: props.siteUrl + props.route.path,
url: "https://goauthentik.io" + props.route.path,
identifier: disqusId,
title: title,
}}