feat: support github style alerts (#513)
Some checks are pending
Deploy Hugo site to Pages / build (push) Waiting to run
Deploy Hugo site to Pages / deploy (push) Blocked by required conditions

* 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 commit 3a70540e0b.

* chore: redo "docs: add alerts instructions to markdown""

This reverts commit 8399373747.

* chore(build): bump hugo version
This commit is contained in:
Xin
2024-12-14 23:44:10 +00:00
committed by GitHub
parent 0c90c1aa50
commit 68dd327312
11 changed files with 229 additions and 33 deletions

View File

@ -35,6 +35,44 @@ Blockquote with attribution
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
```
### Alerts
Alerts are a Markdown extension based on the blockquote syntax that you can use to emphasize critical information.
[GitHub-style alerts](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) are supported.
Please make sure you are using the latest version of Hextra and [Hugo v0.134.0](https://github.com/gohugoio/hugo/releases/tag/v0.134.0) or later.
> [!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.
```markdown {filename=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.
```
### Tables
Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-box.

View File

@ -141,11 +141,14 @@
"dark:hover:hx-text-gray-50",
"dark:hover:hx-text-neutral-50",
"dark:hover:hx-text-white",
"dark:hx-bg-amber-900/30",
"dark:hx-bg-black/60",
"dark:hx-bg-blue-900/30",
"dark:hx-bg-dark",
"dark:hx-bg-dark/50",
"dark:hx-bg-gray-50/10",
"dark:hx-bg-green-900/30",
"dark:hx-bg-indigo-900/30",
"dark:hx-bg-neutral-800",
"dark:hx-bg-neutral-900",
"dark:hx-bg-orange-400/20",
@ -155,9 +158,12 @@
"dark:hx-bg-red-900/30",
"dark:hx-bg-yellow-700/30",
"dark:hx-block",
"dark:hx-border-amber-200/30",
"dark:hx-border-blue-200/30",
"dark:hx-border-gray-100/20",
"dark:hx-border-gray-400",
"dark:hx-border-green-200/30",
"dark:hx-border-indigo-200/30",
"dark:hx-border-neutral-700",
"dark:hx-border-neutral-800",
"dark:hx-border-orange-400/30",
@ -171,12 +177,15 @@
"dark:hx-shadow-[0_-12px_16px_#111]",
"dark:hx-shadow-[0_-1px_0_rgba(255,255,255,.1)_inset]",
"dark:hx-shadow-none",
"dark:hx-text-amber-200",
"dark:hx-text-blue-200",
"dark:hx-text-gray-100",
"dark:hx-text-gray-200",
"dark:hx-text-gray-300",
"dark:hx-text-gray-400",
"dark:hx-text-gray-50",
"dark:hx-text-green-200",
"dark:hx-text-indigo-200",
"dark:hx-text-neutral-200",
"dark:hx-text-neutral-400",
"dark:hx-text-orange-300",
@ -256,15 +265,19 @@
"hover:hx-text-primary-600",
"hx-absolute",
"hx-align-[-2.5px]",
"hx-align-middle",
"hx-align-text-bottom",
"hx-appearance-none",
"hx-aspect-auto",
"hx-bg-amber-100",
"hx-bg-black/80",
"hx-bg-black/[.05]",
"hx-bg-blue-100",
"hx-bg-clip-text",
"hx-bg-gradient-to-r",
"hx-bg-gray-100",
"hx-bg-green-100",
"hx-bg-indigo-100",
"hx-bg-neutral-50",
"hx-bg-orange-50",
"hx-bg-primary-100",
@ -277,12 +290,15 @@
"hx-bg-yellow-50",
"hx-block",
"hx-border",
"hx-border-amber-200",
"hx-border-b",
"hx-border-b-2",
"hx-border-black/5",
"hx-border-blue-200",
"hx-border-gray-200",
"hx-border-gray-500",
"hx-border-green-200",
"hx-border-indigo-200",
"hx-border-orange-100",
"hx-border-red-200",
"hx-border-t",
@ -468,6 +484,7 @@
"hx-text-[.65rem]",
"hx-text-[10px]",
"hx-text-[color:hsl(var(--primary-hue),100%,50%)]",
"hx-text-amber-900",
"hx-text-base",
"hx-text-blue-900",
"hx-text-center",
@ -479,6 +496,8 @@
"hx-text-gray-700",
"hx-text-gray-800",
"hx-text-gray-900",
"hx-text-green-900",
"hx-text-indigo-900",
"hx-text-left",
"hx-text-lg",
"hx-text-orange-800",