From 86a1f3fd9638a65c70fb7892964a396df22409a0 Mon Sep 17 00:00:00 2001
From: Jonas Pleyer <59249415+jonaspleyer@users.noreply.github.com>
Date: Thu, 14 Nov 2024 12:18:59 +0100
Subject: [PATCH 01/20] docs(showcase): add cellular_raza (#498)
* add cellular_raza to showcase exampleSite
* use link from github PR to store image
Co-authored-by: Xin
---------
Co-authored-by: Xin
---
exampleSite/content/showcase/index.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/exampleSite/content/showcase/index.md b/exampleSite/content/showcase/index.md
index 3b6025e..7d42365 100644
--- a/exampleSite/content/showcase/index.md
+++ b/exampleSite/content/showcase/index.md
@@ -12,6 +12,13 @@ Open source projects powered by Hextra
{{< cards >}}
+ {{< card
+ link="https://github.com/jonaspleyer/cellular_raza"
+ title="cellular_raza"
+ image="https://github.com/user-attachments/assets/f24c6455-b70a-419b-b025-e3d60101b673"
+ imageStyle="object-fit:cover; aspect-ratio:16/9;"
+ >}}
+
{{< card
link="https://github.com/mightymoud/sidekick"
title="Sidekick"
From 0dcf7e7a4052d7fccdde0eac0a2e4c9cb47fe811 Mon Sep 17 00:00:00 2001
From: Nishant Srivastava
Date: Wed, 4 Dec 2024 08:34:02 +0100
Subject: [PATCH 02/20] chore(icons): add bluesky icon (#505)
* Update icons.yaml to add bsky icon
Added BlueSky icon to socials
* update the fill color to current color
* Update data/icons.yaml
---------
Co-authored-by: Xin
---
data/icons.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/data/icons.yaml b/data/icons.yaml
index 3138d48..0c57fb8 100644
--- a/data/icons.yaml
+++ b/data/icons.yaml
@@ -289,3 +289,4 @@ youtube:
linkedin:
slack:
+bluesky:
From bd34a5bad3c43a9d32e026e2b3c76952f9ec9dfb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Torbj=C3=B8rn=20Pedersen?=
<113333557+torbjornbp@users.noreply.github.com>
Date: Sun, 8 Dec 2024 13:29:28 +0100
Subject: [PATCH 03/20] fix: rerender mermaid diagrams on theme change (#509)
Make mermaid render diagrams on manual toggle between themes, after initial page load
---
layouts/partials/scripts.html | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 026b344..03d5926 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -37,9 +37,32 @@
{{- $mermaidJS := resources.Get "lib/mermaid/mermaid.min.js" | fingerprint -}}
{{- end -}}
From fe2271b60bd34476726447fd9361aee59eb2a92f Mon Sep 17 00:00:00 2001
From: Xin
Date: Sun, 8 Dec 2024 12:38:44 +0000
Subject: [PATCH 04/20] docs(showcase): add "Model Context Protocol
Specification"
---
exampleSite/content/showcase/index.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/exampleSite/content/showcase/index.md b/exampleSite/content/showcase/index.md
index 7d42365..c7dd04c 100644
--- a/exampleSite/content/showcase/index.md
+++ b/exampleSite/content/showcase/index.md
@@ -12,6 +12,13 @@ Open source projects powered by Hextra
{{< cards >}}
+ {{< card
+ link="https://github.com/modelcontextprotocol/specification"
+ title="Model Context Protocol Specification"
+ image="https://github.com/user-attachments/assets/1bb4f952-b8fc-43b5-9cbd-cd7213c2ba90"
+ imageStyle="object-fit:cover; aspect-ratio:16/9;"
+ >}}
+
{{< card
link="https://github.com/jonaspleyer/cellular_raza"
title="cellular_raza"
@@ -84,7 +91,7 @@ Open source projects powered by Hextra
link="https://hoa.moe/"
title="HITSZ OpenAuto"
image="https://raw.githubusercontent.com/HITSZ-OpenAuto/hoa.moe/main/static/images/showcase-new.png"
- imageStyle="object-fit:cover; aspect-ratio:16/9;"
+ imageStyle="object-fit:cover; aspect-ratio:16/9;"
>}}
{{< card
From 0c90c1aa500dd1da473c474202b38fb82bcb5188 Mon Sep 17 00:00:00 2001
From: Floren Munteanu
Date: Tue, 10 Dec 2024 18:58:36 -0500
Subject: [PATCH 05/20] feat: add hextra hero-section shortcode (#390)
* Implement hextra hero-section
* Implement header size
* Update layouts/shortcodes/hextra/hero-section.html
* Update layouts/shortcodes/hextra/hero-section.html
* Update layouts/shortcodes/hextra/hero-section.html
* Update layouts/shortcodes/hextra/hero-section.html
---------
Co-authored-by: Xin
---
layouts/shortcodes/hextra/hero-section.html | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 layouts/shortcodes/hextra/hero-section.html
diff --git a/layouts/shortcodes/hextra/hero-section.html b/layouts/shortcodes/hextra/hero-section.html
new file mode 100644
index 0000000..bdb37bf
--- /dev/null
+++ b/layouts/shortcodes/hextra/hero-section.html
@@ -0,0 +1,10 @@
+{{- $style := .Get "style" -}}
+{{- $heading := int (strings.TrimPrefix "h" (.Get "heading" | default "h2")) -}}
+{{- $size := cond (ge $heading 4) "xl" (cond (eq $heading 3) "2xl" "4xl") -}}
+
+
+ {{ .Inner | markdownify }}
+
From 68dd3273128d56c84ee6c714e77a3d64f1717526 Mon Sep 17 00:00:00 2001
From: Xin
Date: Sat, 14 Dec 2024 23:44:10 +0000
Subject: [PATCH 06/20] 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 commit 3a70540e0b5651e485612209ee22e04b26432e72.
* chore: redo "docs: add alerts instructions to markdown""
This reverts commit 8399373747f081ff7164c4dd60ac5598a1a0c121.
* chore(build): bump hugo version
---
.prettierrc | 3 +
assets/css/compiled/main.css | 69 +++++++++++++++++++
exampleSite/content/docs/guide/markdown.md | 38 ++++++++++
exampleSite/hugo_stats.json | 19 +++++
.../_markup/render-blockquote-alert.html | 9 +++
.../_markup/render-blockquote-regular.html | 3 +
.../components/github-style-alert.html | 42 +++++++++++
layouts/partials/shortcodes/callout.html | 28 ++++++++
layouts/shortcodes/callout.html | 46 ++++---------
netlify.toml | 2 +-
tailwind.config.js | 3 +
11 files changed, 229 insertions(+), 33 deletions(-)
create mode 100644 layouts/_default/_markup/render-blockquote-alert.html
create mode 100644 layouts/_default/_markup/render-blockquote-regular.html
create mode 100644 layouts/partials/components/github-style-alert.html
create mode 100644 layouts/partials/shortcodes/callout.html
diff --git a/.prettierrc b/.prettierrc
index e0956e4..28eaa1e 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,4 +1,7 @@
{
+ "plugins": [
+ "prettier-plugin-go-template"
+ ],
"goTemplateBracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"printWidth": 200,
diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css
index dc3c35d..f4c238d 100644
--- a/assets/css/compiled/main.css
+++ b/assets/css/compiled/main.css
@@ -952,6 +952,10 @@ video {
.hx-border-t {
border-top-width: 1px;
}
+.hx-border-amber-200 {
+ --tw-border-opacity: 1;
+ border-color: rgb(253 230 138 / var(--tw-border-opacity));
+}
.hx-border-black\/5 {
border-color: rgb(0 0 0 / 0.05);
}
@@ -967,6 +971,14 @@ video {
--tw-border-opacity: 1;
border-color: rgb(107 114 128 / var(--tw-border-opacity));
}
+.hx-border-green-200 {
+ --tw-border-opacity: 1;
+ border-color: rgb(187 247 208 / var(--tw-border-opacity));
+}
+.hx-border-indigo-200 {
+ --tw-border-opacity: 1;
+ border-color: rgb(199 210 254 / var(--tw-border-opacity));
+}
.hx-border-orange-100 {
--tw-border-opacity: 1;
border-color: rgb(255 237 213 / var(--tw-border-opacity));
@@ -982,6 +994,10 @@ video {
--tw-border-opacity: 1;
border-color: rgb(254 249 195 / var(--tw-border-opacity));
}
+.hx-bg-amber-100 {
+ --tw-bg-opacity: 1;
+ background-color: rgb(254 243 199 / var(--tw-bg-opacity));
+}
.hx-bg-black\/80 {
background-color: rgb(0 0 0 / 0.8);
}
@@ -996,6 +1012,14 @@ video {
--tw-bg-opacity: 1;
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
}
+.hx-bg-green-100 {
+ --tw-bg-opacity: 1;
+ background-color: rgb(220 252 231 / var(--tw-bg-opacity));
+}
+.hx-bg-indigo-100 {
+ --tw-bg-opacity: 1;
+ background-color: rgb(224 231 255 / var(--tw-bg-opacity));
+}
.hx-bg-neutral-50 {
--tw-bg-opacity: 1;
background-color: rgb(250 250 250 / var(--tw-bg-opacity));
@@ -1161,6 +1185,9 @@ video {
.hx-text-center {
text-align: center;
}
+.hx-align-middle {
+ vertical-align: middle;
+}
.hx-align-text-bottom {
vertical-align: text-bottom;
}
@@ -1237,6 +1264,10 @@ video {
--tw-text-opacity: 1;
color: hsl(var(--primary-hue) 100% 50% / var(--tw-text-opacity));
}
+.hx-text-amber-900 {
+ --tw-text-opacity: 1;
+ color: rgb(120 53 15 / var(--tw-text-opacity));
+}
.hx-text-blue-900 {
--tw-text-opacity: 1;
color: rgb(30 58 138 / var(--tw-text-opacity));
@@ -1268,6 +1299,14 @@ video {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity));
}
+.hx-text-green-900 {
+ --tw-text-opacity: 1;
+ color: rgb(20 83 45 / var(--tw-text-opacity));
+}
+.hx-text-indigo-900 {
+ --tw-text-opacity: 1;
+ color: rgb(49 46 129 / var(--tw-text-opacity));
+}
.hx-text-orange-800 {
--tw-text-opacity: 1;
color: rgb(154 52 18 / var(--tw-text-opacity));
@@ -2931,6 +2970,9 @@ body:is(html[class~="dark"] *) {
.dark\:hx-hidden:is(html[class~="dark"] *) {
display: none;
}
+.dark\:hx-border-amber-200\/30:is(html[class~="dark"] *) {
+ border-color: rgb(253 230 138 / 0.3);
+}
.dark\:hx-border-blue-200\/30:is(html[class~="dark"] *) {
border-color: rgb(191 219 254 / 0.3);
}
@@ -2941,6 +2983,12 @@ body:is(html[class~="dark"] *) {
--tw-border-opacity: 1;
border-color: rgb(156 163 175 / var(--tw-border-opacity));
}
+.dark\:hx-border-green-200\/30:is(html[class~="dark"] *) {
+ border-color: rgb(187 247 208 / 0.3);
+}
+.dark\:hx-border-indigo-200\/30:is(html[class~="dark"] *) {
+ border-color: rgb(199 210 254 / 0.3);
+}
.dark\:hx-border-neutral-700:is(html[class~="dark"] *) {
--tw-border-opacity: 1;
border-color: rgb(64 64 64 / var(--tw-border-opacity));
@@ -2961,6 +3009,9 @@ body:is(html[class~="dark"] *) {
.dark\:hx-border-yellow-200\/30:is(html[class~="dark"] *) {
border-color: rgb(254 240 138 / 0.3);
}
+.dark\:hx-bg-amber-900\/30:is(html[class~="dark"] *) {
+ background-color: rgb(120 53 15 / 0.3);
+}
.dark\:hx-bg-black\/60:is(html[class~="dark"] *) {
background-color: rgb(0 0 0 / 0.6);
}
@@ -2977,6 +3028,12 @@ body:is(html[class~="dark"] *) {
.dark\:hx-bg-gray-50\/10:is(html[class~="dark"] *) {
background-color: rgb(249 250 251 / 0.1);
}
+.dark\:hx-bg-green-900\/30:is(html[class~="dark"] *) {
+ background-color: rgb(20 83 45 / 0.3);
+}
+.dark\:hx-bg-indigo-900\/30:is(html[class~="dark"] *) {
+ background-color: rgb(49 46 129 / 0.3);
+}
.dark\:hx-bg-neutral-800:is(html[class~="dark"] *) {
--tw-bg-opacity: 1;
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
@@ -3012,6 +3069,10 @@ body:is(html[class~="dark"] *) {
.dark\:hx-to-gray-400:is(html[class~="dark"] *) {
--tw-gradient-to: #9ca3af var(--tw-gradient-to-position);
}
+.dark\:hx-text-amber-200:is(html[class~="dark"] *) {
+ --tw-text-opacity: 1;
+ color: rgb(253 230 138 / var(--tw-text-opacity));
+}
.dark\:hx-text-blue-200:is(html[class~="dark"] *) {
--tw-text-opacity: 1;
color: rgb(191 219 254 / var(--tw-text-opacity));
@@ -3036,6 +3097,14 @@ body:is(html[class~="dark"] *) {
--tw-text-opacity: 1;
color: rgb(249 250 251 / var(--tw-text-opacity));
}
+.dark\:hx-text-green-200:is(html[class~="dark"] *) {
+ --tw-text-opacity: 1;
+ color: rgb(187 247 208 / var(--tw-text-opacity));
+}
+.dark\:hx-text-indigo-200:is(html[class~="dark"] *) {
+ --tw-text-opacity: 1;
+ color: rgb(199 210 254 / var(--tw-text-opacity));
+}
.dark\:hx-text-neutral-200:is(html[class~="dark"] *) {
--tw-text-opacity: 1;
color: rgb(229 229 229 / var(--tw-text-opacity));
diff --git a/exampleSite/content/docs/guide/markdown.md b/exampleSite/content/docs/guide/markdown.md
index 3d6563d..029b2b2 100644
--- a/exampleSite/content/docs/guide/markdown.md
+++ b/exampleSite/content/docs/guide/markdown.md
@@ -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.
diff --git a/exampleSite/hugo_stats.json b/exampleSite/hugo_stats.json
index 2d498b3..788b37d 100644
--- a/exampleSite/hugo_stats.json
+++ b/exampleSite/hugo_stats.json
@@ -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",
diff --git a/layouts/_default/_markup/render-blockquote-alert.html b/layouts/_default/_markup/render-blockquote-alert.html
new file mode 100644
index 0000000..66518fc
--- /dev/null
+++ b/layouts/_default/_markup/render-blockquote-alert.html
@@ -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) -}}
diff --git a/layouts/_default/_markup/render-blockquote-regular.html b/layouts/_default/_markup/render-blockquote-regular.html
new file mode 100644
index 0000000..652cb51
--- /dev/null
+++ b/layouts/_default/_markup/render-blockquote-regular.html
@@ -0,0 +1,3 @@
+
+ {{ .Text }}
+
diff --git a/layouts/partials/components/github-style-alert.html b/layouts/partials/components/github-style-alert.html
new file mode 100644
index 0000000..9b8e71c
--- /dev/null
+++ b/layouts/partials/components/github-style-alert.html
@@ -0,0 +1,42 @@
+{{- $content := .content -}}
+{{- $alertType := .alertType -}}
+{{- $alertTitle := .alertTitle -}}
+
+{{- $icons := dict
+ "note" "information-circle"
+ "tip" "light-bulb"
+ "important" "information-circle"
+ "warning" "exclamation"
+ "caution" "exclamation-circle"
+-}}
+
+{{- $icon := index $icons $alertType -}}
+{{- $title := or $alertTitle (or (i18n $alertType) (title $alertType)) -}}
+
+{{- $defaultClass := "hx-border-orange-100 hx-bg-orange-50 hx-text-orange-800 dark:hx-border-orange-400/30 dark:hx-bg-orange-400/20 dark:hx-text-orange-300" }}
+
+{{- $alertClasses := dict
+ "note" "hx-border-blue-200 hx-bg-blue-100 hx-text-blue-900 dark:hx-border-blue-200/30 dark:hx-bg-blue-900/30 dark:hx-text-blue-200"
+ "tip" "hx-border-green-200 hx-bg-green-100 hx-text-green-900 dark:hx-border-green-200/30 dark:hx-bg-green-900/30 dark:hx-text-green-200"
+ "important" "hx-border-indigo-200 hx-bg-indigo-100 hx-text-indigo-900 dark:hx-border-indigo-200/30 dark:hx-bg-indigo-900/30 dark:hx-text-indigo-200"
+ "warning" "hx-border-amber-200 hx-bg-amber-100 hx-text-amber-900 dark:hx-border-amber-200/30 dark:hx-bg-amber-900/30 dark:hx-text-amber-200"
+ "caution" "hx-border-red-200 hx-bg-red-100 hx-text-red-900 dark:hx-border-red-200/30 dark:hx-bg-red-900/30 dark:hx-text-red-200"
+-}}
+
+{{- $class := index $alertClasses $alertType | default $defaultClass -}}
+
+
+
+
+ {{- with $icon -}}
+ {{- partial "utils/icon.html" (dict "name" . "attributes" `height=16px class="hx-inline-block hx-align-middle hx-mr-2"`) -}}
+ {{- end -}}
+ {{- $title -}}
+
+
+
+
diff --git a/layouts/partials/shortcodes/callout.html b/layouts/partials/shortcodes/callout.html
new file mode 100644
index 0000000..417f631
--- /dev/null
+++ b/layouts/partials/shortcodes/callout.html
@@ -0,0 +1,28 @@
+{{- $content := .content -}}
+{{- $emoji := .emoji -}}
+{{- $icon := .icon -}}
+
+{{- $defaultClass := "hx-border-orange-100 hx-bg-orange-50 hx-text-orange-800 dark:hx-border-orange-400/30 dark:hx-bg-orange-400/20 dark:hx-text-orange-300" -}}
+
+{{- $class := .class | default $defaultClass -}}
+
+
+
+
+ {{- with $emoji -}}
+
+ {{- . -}}
+
+ {{- else -}}
+ {{- with $icon -}}
+ {{ partial "utils/icon.html" (dict "name" . "attributes" `height=1.2em class="hx-inline-block hx-align-middle"`) -}}
+ {{- end -}}
+ {{- end -}}
+
+
+
+
diff --git a/layouts/shortcodes/callout.html b/layouts/shortcodes/callout.html
index 6b56bcb..9c9361a 100644
--- a/layouts/shortcodes/callout.html
+++ b/layouts/shortcodes/callout.html
@@ -1,37 +1,19 @@
-{{ $calloutEmojiDict := dict "info" "ℹ️" "warning" "⚠️" "error" "🚫" }}
-{{ $type := .Get "type" | default "default" }}
+{{- $calloutEmojiDict := dict "info" "ℹ️" "warning" "⚠️" "error" "🚫" -}}
+{{- $type := .Get "type" | default "default" -}}
{{/* If emoji is not set, use the emoji from dict */}}
-{{ $emoji := .Get "emoji" }}
-{{ if eq $emoji "" }}
- {{ $emoji = index $calloutEmojiDict $type }}
-{{ end }}
+{{- $emoji := .Get "emoji" -}}
+{{- if eq $emoji "" -}}
+ {{- $emoji = index $calloutEmojiDict $type -}}
+{{- end -}}
{{/* Also allow using "icon" */}}
-{{ $icon := .Get "icon" }}
+{{- $icon := .Get "icon" -}}
+{{- $content := .InnerDeindent | markdownify -}}
-{{ $defaultClass := "hx-border-orange-100 hx-bg-orange-50 hx-text-orange-800 dark:hx-border-orange-400/30 dark:hx-bg-orange-400/20 dark:hx-text-orange-300" }}
-{{ $infoClass := "hx-border-blue-200 hx-bg-blue-100 hx-text-blue-900 dark:hx-border-blue-200/30 dark:hx-bg-blue-900/30 dark:hx-text-blue-200" }}
-{{ $warningClass := "hx-border-yellow-100 hx-bg-yellow-50 hx-text-yellow-900 dark:hx-border-yellow-200/30 dark:hx-bg-yellow-700/30 dark:hx-text-yellow-200" }}
-{{ $errorClass := "hx-border-red-200 hx-bg-red-100 hx-text-red-900 dark:hx-border-red-200/30 dark:hx-bg-red-900/30 dark:hx-text-red-200" }}
+{{- $defaultClass := "hx-border-orange-100 hx-bg-orange-50 hx-text-orange-800 dark:hx-border-orange-400/30 dark:hx-bg-orange-400/20 dark:hx-text-orange-300" -}}
+{{- $infoClass := "hx-border-blue-200 hx-bg-blue-100 hx-text-blue-900 dark:hx-border-blue-200/30 dark:hx-bg-blue-900/30 dark:hx-text-blue-200" -}}
+{{- $warningClass := "hx-border-yellow-100 hx-bg-yellow-50 hx-text-yellow-900 dark:hx-border-yellow-200/30 dark:hx-bg-yellow-700/30 dark:hx-text-yellow-200" -}}
+{{- $errorClass := "hx-border-red-200 hx-bg-red-100 hx-text-red-900 dark:hx-border-red-200/30 dark:hx-bg-red-900/30 dark:hx-text-red-200" -}}
-{{ $class := cond (eq $type "info") $infoClass (cond (eq $type "warning") $warningClass (cond (eq $type "error") $errorClass $defaultClass)) }}
+{{- $class := cond (eq $type "info") $infoClass (cond (eq $type "warning") $warningClass (cond (eq $type "error") $errorClass $defaultClass)) -}}
-
-
-
- {{- with $emoji -}}
-
- {{ . }}
-
- {{- else -}}
- {{- with $icon }}
- {{ partial "utils/icon.html" (dict "name" . "attributes" `height=1.2em class="hx-inline-block hx-align-middle"`) -}}
- {{- end -}}
- {{- end -}}
-
-
-
-
- {{ .InnerDeindent | markdownify }}
-
-
-
+{{- partial "shortcodes/callout.html" (dict "content" $content "emoji" $emoji "icon" $icon "class" $class) -}}
diff --git a/netlify.toml b/netlify.toml
index 3b30205..4b5d13d 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -7,6 +7,6 @@ command = "cd exampleSite && hugo --gc --minify --themesDir ../.. -b ${DEPLOY_PR
ignore = "false"
[build.environment]
-HUGO_VERSION = "0.132.2"
+HUGO_VERSION = "0.138.0"
GO_VERSION = "1.22.3"
NODE_VERSION = "22.2.0"
diff --git a/tailwind.config.js b/tailwind.config.js
index 0eee071..0331f72 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -61,8 +61,11 @@ module.exports = {
neutral: colors.neutral,
red: colors.red,
orange: colors.orange,
+ green: colors.green,
+ indigo: colors.indigo,
blue: colors.blue,
yellow: colors.yellow,
+ amber: colors.amber,
primary: {
50: makePrimaryColor(97),
100: makePrimaryColor(94),
From 30fddec3fa48723f60401f8e6c4a63214749a8ef Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 15 Dec 2024 14:20:52 +0000
Subject: [PATCH 07/20] chore(deps): bump nanoid from 3.3.7 to 3.3.8 (#514)
---
package-lock.json | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 33c9de6..6a76ddf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1031,9 +1031,9 @@
}
},
"node_modules/nanoid": {
- "version": "3.3.7",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
- "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
+ "version": "3.3.8",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
+ "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
"dev": true,
"funding": [
{
@@ -1041,7 +1041,6 @@
"url": "https://github.com/sponsors/ai"
}
],
- "license": "MIT",
"bin": {
"nanoid": "bin/nanoid.cjs"
},
From 7f5a7f2f5a948652bbc114c8f1597f8eb023b15f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 15 Dec 2024 16:33:44 +0000
Subject: [PATCH 08/20] chore(deps-dev): bump cross-spawn from 7.0.3 to 7.0.6
(#515)
---
package-lock.json | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 6a76ddf..2f413ef 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -523,11 +523,10 @@
}
},
"node_modules/cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
- "license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
From a9b992436e46671d2fbb902dad6f34159d7bcdfa Mon Sep 17 00:00:00 2001
From: Xin
Date: Sun, 15 Dec 2024 20:26:11 +0000
Subject: [PATCH 09/20] chore: update HUGO_VERSION to 0.138.0 in GitHub Actions
workflow
* add FUNDING.yml
---
.github/FUNDING.yml | 15 +++++++++++++++
.github/workflows/pages.yml | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
create mode 100644 .github/FUNDING.yml
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..b1d6700
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,15 @@
+# These are supported funding model platforms
+
+github: imfing
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
+polar: # Replace with a single Polar username
+buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
+thanks_dev: # Replace with a single thanks.dev username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
index 4fcf007..8c9d466 100644
--- a/.github/workflows/pages.yml
+++ b/.github/workflows/pages.yml
@@ -31,7 +31,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
- HUGO_VERSION: 0.136.5
+ HUGO_VERSION: 0.138.0
steps:
- name: Checkout
uses: actions/checkout@v4
From f377609ebaa5d0761a31ffc0bbf9a4785d8453aa Mon Sep 17 00:00:00 2001
From: Xin
Date: Sun, 15 Dec 2024 20:32:54 +0000
Subject: [PATCH 10/20] docs: update HUGO_VERSION to 0.138.0 in deployment
documentation
---
exampleSite/content/docs/guide/deploy-site.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/exampleSite/content/docs/guide/deploy-site.md b/exampleSite/content/docs/guide/deploy-site.md
index 57103f6..b7540a4 100644
--- a/exampleSite/content/docs/guide/deploy-site.md
+++ b/exampleSite/content/docs/guide/deploy-site.md
@@ -54,7 +54,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
- HUGO_VERSION: 0.131.0
+ HUGO_VERSION: 0.138.0
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -146,7 +146,7 @@ For more details, check out:
3. If you are not using [hextra-starter-template][hextra-starter-template], configure the following manually:
- Configure the Build command to `hugo --gc --minify`
- Specify the Publish directory to `public`
- - Add Environment variable `HUGO_VERSION` and set to `0.132.2`
+ - Add Environment variable `HUGO_VERSION` and set to `0.138.0`, or alternatively, set it in `netlify.toml` file
4. Deploy!
Check [Hugo on Netlify](https://docs.netlify.com/integrations/frameworks/hugo/) for more details.
From bc778ee243e2a4a22ee5413adffde5baf79c079d Mon Sep 17 00:00:00 2001
From: Attila Greguss
Date: Mon, 16 Dec 2024 22:21:15 +0000
Subject: [PATCH 11/20] fix: only display footer switches section if it
actually has content (#517)
---
layouts/partials/footer.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 61cbb11..8bbb7d8 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -15,7 +15,7 @@