WikiLink
Hugo Cosmos supports WikiLinks feature so that you can realize internal link in your knowledge base.
Configuration
To use wikilink in Hugo Cosmos, you should enable these options:
|
|
Usage
Specifically, any word surrounded by doubled square brackets is converted to a link. For example, Markdown Syntax is an article illustrate how to write markdown document and we refer the article here.
|
|
You can see that the wikilink is translated to markdown links. At the same time, you can see backlinks in the Markdown Syntax article.
This feature is provided for better cooperation between Hugo Cosmos and Obsidian.
Currently, wikilinks and backlinks is implemented using simple regex matching. There are are some known issues.
- wikilink in inline code or code block would also be replaced by regex, which may cause
ref
error - graph view has not been implemented
- block reference has not been implemented
Cross directory reference
- Your wikilink reference should not start with
/
. - When you refer another notes from a different directory, you should add the directory name in your wikilink reference.
For example, if doc A is under the directory content/docs/doc-a.md
, doc A want to refer doc B content/posts/doc-b.md
You should write the wikilink below in the doc A:
|
|
Same directory reference
You can also check other features like Code Blocks
- When you refer another note from the same directory, the directory name don’t need to be added.
For example, if doc A is under the directory content/docs/doc-a.md
, doc A want to refer doc C content/docs/doc-c.md
You can write the wikilink below in the doc A:
|
|
or
|
|
Pipe Symbol
Hugo Cosmos would use the page title as the wikilink display text by default. For example:
You can also use the pipe symbol |
to override the default text. For example:
New Display Text for Icon Sets
Block Reference
Hugo cosmos also supports block reference
. For example:
|
|
alipay
Author Houmin Wei
Publish January 27, 2023
LastMod July 11, 2023 (8d68658)
License 本作品采用 CC BY-NC-ND 4.0 许可协议进行许可,转载时请注明原文链接
如果你在浏览博客的过程中发现了任何问题,欢迎在对应文章下评论。如果你有其他事情想要咨询,可以通过邮件联系我。
-
No backlinks found.