Link wikilinks to wiki clients

This commit is contained in:
dtonon
2024-07-25 16:38:54 +02:00
parent 6aef19e6fa
commit 42e37db1e7
2 changed files with 12 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ func parseWikilinks(asciidoc string) string {
} }
targetFormatted := strings.ToLower(strings.ReplaceAll(target, " ", "-")) targetFormatted := strings.ToLower(strings.ReplaceAll(target, " ", "-"))
return fmt.Sprintf("link:/wiki/%s[%s]", targetFormatted, display) return fmt.Sprintf("[.bg-lavender.dark:prose:text-neutral-50.dark:text-neutral-50.dark:bg-garnet.px-1]#%s# [.wikilinks]#(link:https://wikistr.com/%s[Wikistr], link:https://wikifreedia.xyz/%s[Wikifreedia])#", display, targetFormatted, targetFormatted)
} }
// Use regex ReplaceAllStringFunc with the replacement function // Use regex ReplaceAllStringFunc with the replacement function

View File

@@ -36,4 +36,15 @@
animation: blink 1s infinite; animation: blink 1s infinite;
color: rgb(222, 222, 222); color: rgb(222, 222, 222);
} }
.wikilinks{
@apply text-neutral-500;
@apply dark:text-neutral-500;
}
.wikilinks a {
@apply text-neutral-500;
@apply dark:text-neutral-500;
}
} }