mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 08:11:18 -04:00
feat: support github style alerts (#513)
* feat: basic github style alerts support * feat: implement github style alert * chore: re-generate css * chore: add missing prettier config * docs: add alerts instructions to markdown * chore: revert "docs: add alerts instructions to markdown" This reverts commit3a70540e0b
. * chore: redo "docs: add alerts instructions to markdown"" This reverts commit8399373747
. * chore(build): bump hugo version
This commit is contained in:
9
layouts/_default/_markup/render-blockquote-alert.html
Normal file
9
layouts/_default/_markup/render-blockquote-alert.html
Normal file
@ -0,0 +1,9 @@
|
||||
{{- if not (in (slice "note" "tip" "important" "warning" "caution") .AlertType) -}}
|
||||
{{- warnf "Alert type %s is not supported" .AlertType -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $content := .Text -}}
|
||||
{{- $alertType := .AlertType -}}
|
||||
{{- $alertTitle := .AlertTitle -}}
|
||||
|
||||
{{- partial "components/github-style-alert.html" (dict "content" $content "alertType" $alertType "alertTitle" $alertTitle) -}}
|
3
layouts/_default/_markup/render-blockquote-regular.html
Normal file
3
layouts/_default/_markup/render-blockquote-regular.html
Normal file
@ -0,0 +1,3 @@
|
||||
<blockquote>
|
||||
{{ .Text }}
|
||||
</blockquote>
|
Reference in New Issue
Block a user