diff --git a/assets/icons/index.js b/assets/icons/index.js index 0931ad02..9ada94cc 100644 --- a/assets/icons/index.js +++ b/assets/icons/index.js @@ -59,6 +59,7 @@ import { faEdit, faEllipsisH, faEnvelope, + faExclamationCircle, faExclamationTriangle, faExpand, faExpandAlt, @@ -121,6 +122,7 @@ let icons = [ faEdit, faEllipsisH, faEnvelope, + faExclamationCircle, faExclamationTriangle, faExpand, faExpandAlt, diff --git a/config.toml b/config.toml index 6520e01b..4d377c1f 100644 --- a/config.toml +++ b/config.toml @@ -1,7 +1,7 @@ [module] [module.hugoVersion] extended = true -min = "0.128.0" +min = "0.134.0" [params] sass_transpiler = "libsass" # dartsass is recommended, since libsass is deprecated. diff --git a/exampleSite/content/posts/markdown-syntax/index.ar.md b/exampleSite/content/posts/markdown-syntax/index.ar.md index c61ca092..b4a194e6 100644 --- a/exampleSite/content/posts/markdown-syntax/index.ar.md +++ b/exampleSite/content/posts/markdown-syntax/index.ar.md @@ -68,6 +68,50 @@ authors = ["Hugo"] [^1]: هذا النص مقتبس من لا شيء. +### Blockquote Alerts + +```markdown +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. +``` + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. + ## الجداول يدعم هوجو كتابة الجداول على الرغم من أنها ليست جزءًا من المواصفات القياسية للغة ماركداون. diff --git a/exampleSite/content/posts/markdown-syntax/index.fr.md b/exampleSite/content/posts/markdown-syntax/index.fr.md index 493ac166..d9892e81 100644 --- a/exampleSite/content/posts/markdown-syntax/index.fr.md +++ b/exampleSite/content/posts/markdown-syntax/index.fr.md @@ -63,6 +63,50 @@ The blockquote element represents content that is quoted from another source, op [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. +### Blockquote Alerts + +```markdown +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. +``` + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. + ## Tables Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. diff --git a/exampleSite/content/posts/markdown-syntax/index.md b/exampleSite/content/posts/markdown-syntax/index.md index 97e0cba8..cc14cbf0 100644 --- a/exampleSite/content/posts/markdown-syntax/index.md +++ b/exampleSite/content/posts/markdown-syntax/index.md @@ -63,6 +63,50 @@ The blockquote element represents content that is quoted from another source, op [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. +### Blockquote Alerts + +```markdown +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. +``` + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. + ## Tables Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. diff --git a/exampleSite/content/posts/markdown-syntax/index.zh-hans.md b/exampleSite/content/posts/markdown-syntax/index.zh-hans.md index ac766f8e..c1fea381 100644 --- a/exampleSite/content/posts/markdown-syntax/index.zh-hans.md +++ b/exampleSite/content/posts/markdown-syntax/index.zh-hans.md @@ -63,6 +63,50 @@ The blockquote element represents content that is quoted from another source, op [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. +### Blockquote Alerts + +```markdown +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. +``` + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. + ## Tables Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. diff --git a/exampleSite/content/posts/markdown-syntax/index.zh-hant.md b/exampleSite/content/posts/markdown-syntax/index.zh-hant.md index 3e007df1..79ea7846 100644 --- a/exampleSite/content/posts/markdown-syntax/index.zh-hant.md +++ b/exampleSite/content/posts/markdown-syntax/index.zh-hant.md @@ -63,6 +63,50 @@ The blockquote element represents content that is quoted from another source, op [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. +### Blockquote Alerts + +```markdown +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. +``` + +> [!NOTE] +> Useful information that users should know, even when skimming content. + +> [!TIP] +> Helpful advice for doing things better or more easily. + +> [!IMPORTANT] +> Key information users need to know to achieve their goal. + +> [!WARNING] +> Urgent info that needs immediate user attention to avoid problems. + +> [!CAUTION] +> Advises about risks or negative outcomes of certain actions. + +> [!QUESTION]+ Can alerts be foldable? +> Yes, they can, you just need to append the `+` or `-` sign to the type. +> +> Click the heading to preview. + ## Tables Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. diff --git a/i18n/ar.toml b/i18n/ar.toml index fcc9bbae..90c8e46e 100644 --- a/i18n/ar.toml +++ b/i18n/ar.toml @@ -10,6 +10,21 @@ other = "عنّي" [actions] other = "الإجراءات" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "علي باي" diff --git a/i18n/de.toml b/i18n/de.toml index 6232537e..e7823fa7 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -10,6 +10,21 @@ other = "Über mich" [actions] other = "Aktionen" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/en.toml b/i18n/en.toml index 3d1596fc..fff8c197 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -10,6 +10,21 @@ other = "About Me" [actions] other = "Actions" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/es.toml b/i18n/es.toml index bec53117..7bbaa847 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -10,6 +10,21 @@ other = "Sobre Mí" [actions] other = "Acciones" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/fr.toml b/i18n/fr.toml index 92829d07..a2d2a900 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -1,6 +1,21 @@ [about_me] other = "À propos" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/id.toml b/i18n/id.toml index 7750060c..9a53e661 100644 --- a/i18n/id.toml +++ b/i18n/id.toml @@ -7,6 +7,21 @@ other = "Halaman yang Anda cari tidak ditemukan." [about_me] other = "Tentang Saya" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/ja.toml b/i18n/ja.toml index 0a724ed7..38091ae3 100644 --- a/i18n/ja.toml +++ b/i18n/ja.toml @@ -10,6 +10,21 @@ other = "私について" [actions] other = "Actions" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/pl.toml b/i18n/pl.toml index 227eb3b6..1c7fde38 100644 --- a/i18n/pl.toml +++ b/i18n/pl.toml @@ -10,6 +10,21 @@ other = "O mnie" [actions] other = "Actions" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/pt.toml b/i18n/pt.toml index 21b83509..b9ba310c 100644 --- a/i18n/pt.toml +++ b/i18n/pt.toml @@ -7,6 +7,21 @@ other = "Não conseguimos encontrar a página que procura." [about_me] other = "Sobre" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/ru.toml b/i18n/ru.toml index 19206b15..781b9a88 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -10,6 +10,21 @@ other = "Обо мне" [actions] other = "Действия" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/uk.toml b/i18n/uk.toml index 723af6c4..ba5e9e89 100644 --- a/i18n/uk.toml +++ b/i18n/uk.toml @@ -10,6 +10,21 @@ other = "Про мене" [actions] other = "Дії" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/uz.toml b/i18n/uz.toml index 03e91363..f3893f22 100644 --- a/i18n/uz.toml +++ b/i18n/uz.toml @@ -1,6 +1,21 @@ [about_me] other = "Men haqimda" +[alert_caution] +other = 'Caution' + +[alert_important] +other = 'Important' + +[alert_note] +other = 'Note' + +[alert_tip] +other = 'Tip' + +[alert_warning] +other = 'Warning' + [alipay] other = "Alipay" diff --git a/i18n/zh-cn.toml b/i18n/zh-cn.toml index 7dec017f..5238523c 100644 --- a/i18n/zh-cn.toml +++ b/i18n/zh-cn.toml @@ -10,6 +10,21 @@ other = "关于我" [actions] other = "操作" +[alert_caution] +other = '小心' + +[alert_important] +other = '重要' + +[alert_note] +other = '注意' + +[alert_tip] +other = '提示' + +[alert_warning] +other = '警告' + [alipay] other = "支付宝" diff --git a/i18n/zh-hans.toml b/i18n/zh-hans.toml index 7dec017f..5238523c 100644 --- a/i18n/zh-hans.toml +++ b/i18n/zh-hans.toml @@ -10,6 +10,21 @@ other = "关于我" [actions] other = "操作" +[alert_caution] +other = '小心' + +[alert_important] +other = '重要' + +[alert_note] +other = '注意' + +[alert_tip] +other = '提示' + +[alert_warning] +other = '警告' + [alipay] other = "支付宝" diff --git a/i18n/zh-hant.toml b/i18n/zh-hant.toml index 7764c22e..1b84aee4 100644 --- a/i18n/zh-hant.toml +++ b/i18n/zh-hant.toml @@ -10,6 +10,21 @@ other = "關於我" [actions] other = "操作" +[alert_caution] +other = '小心' + +[alert_important] +other = '重要' + +[alert_note] +other = '注意' + +[alert_tip] +other = '提示' + +[alert_warning] +other = '警告' + [alipay] other = "支付寶" diff --git a/i18n/zh-hk.toml b/i18n/zh-hk.toml index 386609f0..c422e065 100644 --- a/i18n/zh-hk.toml +++ b/i18n/zh-hk.toml @@ -10,6 +10,21 @@ other = "關於我" [actions] other = "操作" +[alert_caution] +other = '小心' + +[alert_important] +other = '重要' + +[alert_note] +other = '注意' + +[alert_tip] +other = '提示' + +[alert_warning] +other = '警告' + [alipay] other = "支付寶" diff --git a/i18n/zh-tw.toml b/i18n/zh-tw.toml index 7764c22e..1b84aee4 100644 --- a/i18n/zh-tw.toml +++ b/i18n/zh-tw.toml @@ -10,6 +10,21 @@ other = "關於我" [actions] other = "操作" +[alert_caution] +other = '小心' + +[alert_important] +other = '重要' + +[alert_note] +other = '注意' + +[alert_tip] +other = '提示' + +[alert_warning] +other = '警告' + [alipay] other = "支付寶" diff --git a/layouts/_default/_markup/render-blockquote-alert.html b/layouts/_default/_markup/render-blockquote-alert.html new file mode 100644 index 00000000..c4961b74 --- /dev/null +++ b/layouts/_default/_markup/render-blockquote-alert.html @@ -0,0 +1,39 @@ +{{- $icons := dict + "caution" `` + "important" `` + "note" `` + "question" `` + "tip" `` + "warning" `` +}} +{{- $icon := default "" (index $icons .AlertType) | safeHTML }} +{{- $styles := dict + "caution" "danger" + "important" "primary" + "note" "info" + "question" "warning" + "tip" "success" + "warning" "warning" +}} +{{- $title := or .AlertTitle (printf "alert_%s" .AlertType | i18n) (title .AlertType) }} + diff --git a/netlify.toml b/netlify.toml index 9c6af085..f84e16bf 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,7 +3,7 @@ publish = "exampleSite/public" [build.environment] NODE_VERSION = "18.14.1" -HUGO_VERSION = "0.131.0" +HUGO_VERSION = "0.135.0" HUGO_ENABLEGITINFO = "true" GO_VERSION = "1.20.1"