hugo-fixit / FixIt

🔧 A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://fixit.lruihao.cn
MIT License
801 stars 109 forks source link

[FEATURE] Support comments for markdown #544

Open Lruihao opened 2 weeks ago

Lruihao commented 2 weeks ago

Describe the feature you want 描述你的功能需求

To support an extended markdown format like obsidian comments.

This is an %%inline%% comment.

%%
This is a block comment.

Block comments can span multiple lines.
%%

Useful reference 有价值的参考

{{- /* Comments for Markdown */ -}}
{{- $content = replaceRE "%%(.|\n)*?%%" "" $content -}}
{{- $content = replace $content "<p></p>" "" -}}
Lruihao commented 4 days ago

There is no good way to implement it, so let's put it aside for now.