| | |
| | | .replace(/<[^>]*>/g, '') |
| | | .replace(/^[=\-]{2,}\s*$/g, '') |
| | | .replace(/\[\^.+?\](\: .*?$)?/g, '') |
| | | .replace(/(#{1,6})\s+(.+)\1?/g, '<b>$2</b>') |
| | | .replace(/\s{0,2}\[.*?\]: .*?$/g, '') |
| | | .replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, options.useImgAltText ? '$1' : '') |
| | | .replace(/\[(.*?)\][\[\(].*?[\]\)]/g, '$1') |
| | |
| | | // SPA navigation |
| | | window.navigate( |
| | | new URL( |
| | | `${BASE_URL.slice(0, -1)}${id}#:~:text=${encodeURIComponent(term)}/` |
| | | `${BASE_URL}${id}#:~:text=${encodeURIComponent(term)}/` |
| | | ), |
| | | '.singlePage' |
| | | ) |
| | |
| | | openToc: false |
| | | enableLinkPreview: true |
| | | enableLatex: true |
| | | enableSPA: false |
| | | description: |
| | | Host your second brain and digital garden for free. Quartz features extremely fast full-text search, |
| | | Wikilink support, backlinks, local graph, tags, and link previews. |
| | |
| | | {{$cleanedInbound := apply (apply $inbound "index" "." "source") "replace" "." " " "-"}} |
| | | {{- range $cleanedInbound | uniq -}} |
| | | {{$l := printf "%s%s/" $host .}} |
| | | {{$l = cond (eq $l "//") "/" $l}} |
| | | {{with (index $contentTable .)}} |
| | | <li> |
| | | <a href="{{$l}}">{{index (index . "title")}}</a> |
| | |
| | | </style> |
| | | {{ $js := resources.Get "js/graph.js" | resources.Fingerprint "md5" }} |
| | | <script src="{{ $js.Permalink }}"></script> |
| | | <script> |
| | | drawGraph( |
| | | {{strings.TrimRight "/" .Page.Permalink}}, |
| | | {{strings.TrimRight "/" .Site.BaseURL}}, |
| | | {{$.Site.Data.graphConfig.paths}}, |
| | | {{$.Site.Data.graphConfig.depth}}, |
| | | {{$.Site.Data.graphConfig.enableDrag}}, |
| | | {{$.Site.Data.graphConfig.enableLegend}}, |
| | | {{$.Site.Data.graphConfig.enableZoom}} |
| | | ); |
| | | </script> |
| | |
| | | content, |
| | | })) |
| | | </script> |
| | | {{if $.Site.Data.config.enableSPA}} |
| | | <script type="module"> |
| | | import { router, navigate } from "https://unpkg.com/million/dist/router.mjs"; |
| | | // SPA navigation for access later |
| | |
| | | window.addEventListener("million:navigate", callback); |
| | | window.addEventListener("DOMContentLoaded", callback); |
| | | </script> |
| | | {{else}} |
| | | <script>window.navigate = (url) => window.location.href = url</script> |
| | | {{end}} |
| | | </head> |
| | | {{ template "_internal/google_analytics.html" . }} |