mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-08 22:53:39 +00:00
feat: process tags in content
This commit is contained in:
parent
ae2e3b463a
commit
5599eb590e
4 changed files with 41 additions and 20 deletions
quartz/plugins/transformers
|
@ -72,7 +72,8 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
|
|||
typeof node.properties.href === "string"
|
||||
) {
|
||||
let dest = node.properties.href as RelativeURL
|
||||
node.properties.className = isAbsoluteUrl(dest) ? "external" : "internal"
|
||||
node.properties.className ??= []
|
||||
node.properties.className.push(isAbsoluteUrl(dest) ? "external" : "internal")
|
||||
|
||||
// don't process external links or intra-document anchors
|
||||
if (!(isAbsoluteUrl(dest) || dest.startsWith("#"))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue