remark
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2024-09-07 00:24:29 +03:00
parent 2e1d270837
commit 07923196fb
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C
2 changed files with 11 additions and 25 deletions

View File

@ -1,6 +1,4 @@
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
import { Root } from "mdast"
import { classNames } from "../util/lang"
// @ts-ignore
// import script from "./scripts/comments.inline"
@ -28,7 +26,7 @@ export default ((opts: Options) => {
show_email_subscription: false,
simple_view: false
};
`;
`
const embedScript = `
!function(e,n){
@ -42,28 +40,17 @@ export default ((opts: Options) => {
d.appendChild(r)
}
}(remark_config.components||["embed"], document);
`;
`
return {
name: "TableOfContents",
markdownPlugins() {
return [
() => {
return async (tree: Root, file) => {
// const display = file.data.frontmatter?.enableComments ?? true
// if (display) {
<>
<hr />
<div id="remark42" style="margin-top: 2rem"></div>
<script dangerouslySetInnerHTML={{ __html: remarkConfig }}></script>
<script dangerouslySetInnerHTML={{ __html: embedScript }}></script>
</>
// }
}
}
]
}
}
};
return Remark
}) satisfies QuartzComponentConstructor<Options>;
}) satisfies QuartzComponentConstructor<Options>

View File

@ -234,7 +234,6 @@ export function renderPage(
</div>
</div>
<Content {...componentData} />
<hr />
<div class="page-footer">
{afterBody.map((BodyComponent) => (
<BodyComponent {...componentData} />