fix comments
This commit is contained in:
1 parent
a311ef72d3
commit
8960aa88bd
4 files changed
+9
-8
No files matched your search
@@ -22,7 +22,7 @@ const PostPage = (post: IPost) => {
|
||||
window.remark42Instance = window.REMARK42.createInstance({
|
||||
node: remark42Ref.current,
|
||||
host: THEME.comment.remark42.host,
|
||||
site_id: THEME.comment.remark42.siteId
|
||||
site_id: THEME.comment.remark42.site_id
|
||||
})
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
|
||||
|
||||
return {
|
||||
paths: dbPost.find().map(({ path }) => ({
|
||||
params: { path: path.split(/\//g).map(encodeURIComponent) }
|
||||
params: { path: path.split(/\//g) }
|
||||
})),
|
||||
fallback: false
|
||||
}
|
||||
@@ -108,7 +108,7 @@ export const getStaticProps: GetStaticProps = async (ctx) => {
|
||||
|
||||
return {
|
||||
props: dbPost.findOne({
|
||||
path: (ctx.params.path as string[]).map(decodeURIComponent).join('/')
|
||||
path: (ctx.params.path as string[]).join('/')
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user