目錄

Hugo 中一些好用的語法

1. Admonition

主要可以用來 Highlight 一些重要的東西,需要自行補兩個{{ }},如下圖

1
2
3
< admonition type=tip title="This is a tip" open=true >
	Some tips...
< /admonition >

Admonition type 允許的類別

  • note

    This is a Note
    Some Note...
    

  • abstract

    This is a Abstract
    Some Abstract...
    

  • info

    This is a Info
    Some Info...
    

  • tip

    This is a Tip
    Some Tip...
    

  • success

    This is a Success
    Some Success...
    

  • question

    This is a Question
    Some Question...
    

  • Warning

    This is a Warning
    Some Warning...
    

  • Failure

    This is a Failure
    Some Failure...
    

  • Danger

    This is a Danger
    Some Danger...
    

  • Bug

    This is a Bug
    Some Bug...
    

  • Example

    This is a Example
    Some Example...
    

  • Quote

    This is a Quote
    Some Quote...
    

2. 修改文字顏色與大小

1
2
<font color=Yellow>黃色</font>
<font color=#6F00D2 size=4>紫色 大小為4</font>

以下為實際顯示 :

黃色

紫色 大小為4

🔗色碼表參考網址

🔗參考

  1. 主题文档 - 扩展 Shortcodes - LoveIt (hugoloveit.com)
  2. Markdown进阶(更改字体、颜色、大小,设置文字背景色,调整图片大小设置居中)_heimu24的博客-CSDN博客_markdown修改字体
comments powered by Disqus