mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-31 00:34:05 -06:00
Quartz sync: Sep 10, 2023, 2:46 PM
This commit is contained in:
parent
3468b955d1
commit
4cb6534241
@ -5,7 +5,7 @@ const config: QuartzConfig = {
|
|||||||
configuration: {
|
configuration: {
|
||||||
defaultDateType: "published",
|
defaultDateType: "published",
|
||||||
pageTitle: "🌱 be-far",
|
pageTitle: "🌱 be-far",
|
||||||
enableSPA: false,
|
enableSPA: true,
|
||||||
enablePopovers: true,
|
enablePopovers: true,
|
||||||
analytics: null,
|
analytics: null,
|
||||||
baseUrl: "be-far.com",
|
baseUrl: "be-far.com",
|
||||||
|
|||||||
@ -17,7 +17,7 @@ export default ((opts?: Optionss) => {
|
|||||||
<footer>
|
<footer>
|
||||||
<hr />
|
<hr />
|
||||||
<p style="margin-bottom:4px;font-weight:bold;font-size:2em;">
|
<p style="margin-bottom:4px;font-weight:bold;font-size:2em;">
|
||||||
Share your thoughts with <a class="internal" href="./Projects/Obsidian/quartz-comments">Remark42</a>
|
Share your thoughts with <a class="internal" href="/Projects/Obsidian/quartz-comments">Remark42</a>
|
||||||
</p>
|
</p>
|
||||||
<div id="remark42"></div>
|
<div id="remark42"></div>
|
||||||
<hr />
|
<hr />
|
||||||
|
|||||||
@ -45,22 +45,21 @@ export const Remark42: QuartzTransformerPlugin<Options> = (opts?: Options) => {
|
|||||||
|
|
||||||
// Allow SPA mode
|
// Allow SPA mode
|
||||||
const spaRouting : string = `
|
const spaRouting : string = `
|
||||||
document.addEventListener("nav", () => {
|
function initRemark42() {
|
||||||
;(function () {
|
if (window.REMARK42) {
|
||||||
var host = // Your remark42 host
|
if (this.remark42Instance) {
|
||||||
var components = ['embed'] // Your choice of remark42 components
|
this.remark42Instance.destroy()
|
||||||
|
}
|
||||||
|
|
||||||
;(function(c) {
|
this.remark42Instance = window.REMARK42.createInstance(remark_config)
|
||||||
for (let i = 0; i < c.length; i++) {
|
|
||||||
const d = document
|
|
||||||
const s = d.createElement('script')
|
|
||||||
s.src = remark_config.host + '/web/' + c[i] + '.js'
|
|
||||||
s.defer = true
|
|
||||||
;(d.head || d.body).appendChild(s)
|
|
||||||
}
|
}
|
||||||
})(components)
|
}
|
||||||
})
|
|
||||||
})`
|
document.addEventListener('nav', () => {
|
||||||
|
this.initRemark42()
|
||||||
|
})
|
||||||
|
`
|
||||||
|
scripts.push({script:spaRouting, loadTime:"afterDOMReady", contentType:"inline"})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: "Remark42",
|
name: "Remark42",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user