website: hardcode url for disqus comments
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
7cfd84d8f0
commit
8564f9ef87
|
@ -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,
|
||||||
}}
|
}}
|
||||||
|
|
Reference in New Issue