Compare commits

...

14 Commits

Author SHA1 Message Date
37a135f38a Merge branch 'main' of https://code.mygenius.co/Genius/hextra 2024-06-29 16:58:10 -04:00
8ecd48d391 attempting another fix for gitea icon issue 2024-06-29 16:50:39 -04:00
0c9c900018 updating gitea icon svg code 2024-06-29 14:09:14 -04:00
1200a7bee4 adding svg data for gitea icon 2024-06-29 08:01:10 -04:00
1313415c8b feat: add customize flexsearch tokenize feature instruction to docs (#322)
* feat: add customize flexsearch tokenize feature instruction to docs

* Update configuration.md

* Update configuration.md

* Update configuration.zh-cn.md

---------

Co-authored-by: loenvom <loenvom@qq.com>
Co-authored-by: Xin <xin@imfing.com>
2024-06-02 13:53:38 +01:00
3cba6b9820 feat: add support for breadcrumbs param in front matter for showing/hiding breadcrumbs on specific pages (#367)
* feat: add support for `hideBreadcrumbs` front-matter param

* docs(en): add some docs about breadcrumb nav, including new hideBreadcrumbs param

* fix: fix typo in hideBreadcrumbs param check in breadcrumbs.html partial

* docs(en): tidy up the Breadcrumb Navigation documentation

* fix: rework hideBreadcrumbs param to breadcrumbs; update docs accordingly

* fix: use relpermalink in breadcrumb

---------

Co-authored-by: Xin <xin@imfing.com>
2024-06-02 11:01:06 +01:00
6ee6ddeacb i18n: add Hebrew translation (#405) 2024-05-29 22:27:34 +01:00
db92de0f1b i18n: add Ukrainian translation (#403) 2024-05-29 09:13:24 +01:00
b2bc4f7098 fix: use hugo.IsMultilingual to replace deprecated .Site.IsMultiLingual (#404) 2024-05-29 09:11:25 +01:00
857c4e4ca1 chore: update AXIVO docs image format (#402) 2024-05-26 18:38:55 +01:00
d3f251b621 chore(showcase): add AXIVO docs (#400) 2024-05-25 10:19:14 +01:00
d43ac66494 feat: add hextra hero-container shortcode (#389)
* Implement hextra hero-container

* Fix width

* Fix width

* Fix width

* Set number of columns

* Fix display for mobile devices

* Trim image prefix

* Implement image card

* Fix width

* Fix css
2024-05-23 23:36:46 +01:00
4eca719b0b docs(fix): correct a mistake in markdown guide (#394)
Fix code mistake by making sure backticks are inserted at start and end of example text
2024-05-21 10:09:03 +01:00
daaf281012 i18n: add Dutch translation (#383)
Added Dutch translation.
2024-05-06 01:46:22 +01:00
19 changed files with 199 additions and 21 deletions

View File

@ -57,7 +57,7 @@ We recommend that you search existing [issues][issues] or discussions before ope
### Local development setup ### Local development setup
- [Hugo][hugo] >= v0.115.0 (extended version) - [Hugo][hugo] >= v0.124.0 (extended version)
- [Node.js][nodejs] - [Node.js][nodejs]
- [Go][go] - [Go][go]

View File

@ -31,7 +31,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
HUGO_VERSION: 0.124.1 HUGO_VERSION: 0.126.1
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@ -9,6 +9,11 @@ github: >
<path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path> <path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path>
</svg> </svg>
gitea: >
<svg fill="currentColor" viewBox="75 100 824 824">
<path d="M762.2 350.3c-100.9 5.3-160.7 8-212 8.5v114.1l-16-7.9-.1-106.1c-58.9 0-110.7-3.1-209.1-8.6-12.3-.1-29.5-2.4-47.9-2.5-47.1-.1-110.2 33.5-106.7 118C175.8 597.6 296 609.9 344 610.9c5.3 24.7 61.8 110.1 103.6 114.6H631c109.9-8.2 192.3-373.8 131.2-375.2zm-546 117.3c-4.7-36.6 11.8-74.8 73.2-73.2C296.1 462 307 501.5 329 561.9c-56.2-7.4-104-25.7-112.8-94.3zm415.6 83.5-51.3 105.6c-6.5 13.4-22.7 19-36.2 12.5l-105.6-51.3c-13.4-6.5-19-22.7-12.5-36.2l51.3-105.6c6.5-13.4 22.7-19 36.2-12.5l105.6 51.3c13.4 6.6 19 22.8 12.5 36.2z M555 609.9c.1-.2.2-.3.2-.5 17.2-35.2 24.3-49.8 19.8-62.4-3.9-11.1-15.5-16.6-36.7-26.6-.8-.4-1.7-.8-2.5-1.2.2-2.3-.1-4.7-1-7-.8-2.3-2.1-4.3-3.7-6l13.6-27.8-11.9-5.8-13.7 28.4c-2 0-4.1.3-6.2 1-8.9 3.2-13.5 13-10.3 21.9.7 1.9 1.7 3.5 2.8 5l-23.6 48.4c-1.9 0-3.8.3-5.7 1-8.9 3.2-13.5 13-10.3 21.9 3.2 8.9 13 13.5 21.9 10.3 8.9-3.2 13.5-13 10.3-21.9-.9-2.5-2.3-4.6-4-6.3l23-47.2c2.5.2 5 0 7.5-.9 2.1-.8 3.9-1.9 5.5-3.3.9.4 1.9.9 2.7 1.3 17.4 8.2 27.9 13.2 30 19.1 2.6 7.5-5.1 23.4-19.3 52.3-.1.2-.2.5-.4.7-2.2-.1-4.4.2-6.5 1-8.9 3.2-13.5 13-10.3 21.9 3.2 8.9 13 13.5 21.9 10.3 8.9-3.2 13.5-13 10.3-21.9-.6-2-1.9-4-3.4-5.7z"></path>
</svg>
codeberg: > codeberg: >
<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M11.955.49A12 12 0 0 0 0 12.49a12 12 0 0 0 1.832 6.373L11.838 5.928a.187.14 0 0 1 .324 0l10.006 12.935A12 12 0 0 0 24 12.49a12 12 0 0 0-12-12 12 12 0 0 0-.045 0zm.375 6.467 4.416 16.553a12 12 0 0 0 5.137-4.213z"/> <path d="M11.955.49A12 12 0 0 0 0 12.49a12 12 0 0 0 1.832 6.373L11.838 5.928a.187.14 0 0 1 .324 0l10.006 12.935A12 12 0 0 0 24 12.49a12 12 0 0 0-12-12 12 12 0 0 0-.045 0zm.375 6.467 4.416 16.553a12 12 0 0 0 5.137-4.213z"/>

View File

@ -251,6 +251,23 @@ Options for `flexsearch.index`:
- `heading` - level 1 and level 2 headings - `heading` - level 1 and level 2 headings
- `title` - only include the page title - `title` - only include the page title
To customize the search tokenize, set the `params.search.flexsearch.tokenize` parameter in the config file:
```yaml {filename="hugo.yaml"}
params:
# ...
flexsearch:
# full | forward | reverse | strict
tokenize: forward
```
Options for [`flexsearch.tokenize`](https://github.com/nextapps-de/flexsearch/#tokenizer-prefix-search):
- `strict` - index whole words
- `forward` - incrementally index words in forward direction
- `reverse` - incrementally index words in both directions
- `full` - index every possible combination
To exclude a page from the search index, set the `excludeSearch: true` in the front matter of the page: To exclude a page from the search index, set the `excludeSearch: true` in the front matter of the page:
```yaml {filename="content/docs/guide/configuration.md"} ```yaml {filename="content/docs/guide/configuration.md"}

View File

@ -219,6 +219,25 @@ params:
- `heading` - 一级和二级标题 - `heading` - 一级和二级标题
- `title` - 仅搜索标题 - `title` - 仅搜索标题
要自定义检索分词,请在配置文件中设置`params.search.flexsearch.tokenize`
```hugo.yaml
params:
# ...
flexsearch:
# full | forward | reverse | strict
tokenize: forward
```
[`flexsearch.tokenize`](https://github.com/nextapps-de/flexsearch/#tokenizer-prefix-search)的可选项:
- `strict` - 严格单词匹配
- `forward` - 单词前缀匹配
- `reverse` - 单词前后缀匹配
- `full` - 单词子串匹配。
> 在默认的分词逻辑下,中文一句话就是一个“单词”
要从搜索索引中排除页面,更改 front matter 中的 `excludeSearch: true`: 要从搜索索引中排除页面,更改 front matter 中的 `excludeSearch: true`:
```yaml {filename="content/docs/guide/configuration.md"} ```yaml {filename="content/docs/guide/configuration.md"}

View File

@ -14,7 +14,7 @@ Hugo supports [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax for form
| Style | Syntax | Example | Output | | Style | Syntax | Example | Output |
| -------- | -------- | ------ | ------ | | -------- | -------- | ------ | ------ |
| Bold | `**bold text**` | `**bold text**` | **bold text** | | Bold | `**bold text**` | `**bold text**` | **bold text** |
| Italic | `*italicized text*` | `*italicized text* | *italicized text* | | Italic | `*italicized text*` | `*italicized text*` | *italicized text* |
| Strikethrough | `~~strikethrough text~~` | `~~strikethrough text~~` | ~~strikethrough text~~ | | Strikethrough | `~~strikethrough text~~` | `~~strikethrough text~~` | ~~strikethrough text~~ |
| Subscript | `<sub></sub>` | `This is a <sub>subscript</sub> text` | This is a <sub>subscript</sub> text | | Subscript | `<sub></sub>` | `This is a <sub>subscript</sub> text` | This is a <sub>subscript</sub> text |
| Superscript | `<sup></sup>` | `This is a <sup>superscript</sup> text` | This is a <sup>superscript</sup> text | | Superscript | `<sup></sup>` | `This is a <sup>superscript</sup> text` | This is a <sup>superscript</sup> text |

View File

@ -82,6 +82,45 @@ weight: 2
It is recommended to keep the sidebar not too deep. If you have a lot of content, consider **splitting them into multiple sections**. It is recommended to keep the sidebar not too deep. If you have a lot of content, consider **splitting them into multiple sections**.
{{< /callout >}} {{< /callout >}}
## Breadcrumb Navigation
Breadcrumbs are auto-generated based on the directory structure of `/content`.
For example, consider the file structure [demonstrated above](#directory-structure). Given that structure, the breadcrumbs atop the page at `/docs/guide/organize-files/` would appear automatically as follows:
```
Documentation > Guide > Organize Files
```
### Customizing Breadcrumb Link Titles
By default, each breadcrumb link is generated based on that page's `title` parameter. You can customize this by specifying a `linkTitle`.
For example, if instead of `Organize Files` we wanted the breadcrumb to be `Foo Bar`:
```yaml {filename="content/docs/guide/organize-files.md"}
---
linkTitle: Foo Bar
title: Organize Files
---
```
This would now generate the following breadcrumbs:
```
Documentation > Guide > Foo Bar
```
### Hiding Breadcrumbs
You can hide breadcrumbs completely from a page by specfying `breadcrumbs: false` in its front matter:
```yaml {filename="content/docs/guide/organize-files.md"}
---
breadcrumbs: false
title: Organize Files
---
```
## Configure Content Directory ## Configure Content Directory
By default, the root `content/` directory is used by Hugo to build the site. By default, the root `content/` directory is used by Hugo to build the site.

View File

@ -13,6 +13,13 @@ Open source projects powered by Hextra
{{< cards >}} {{< cards >}}
{{< card
link="https://github.com/axivo/website"
title="AXIVO Docs"
image="https://github.com/imfing/hextra/assets/19806136/f22f0710-23a0-430b-8bad-616283b8a3e5"
imageStyle="object-fit:cover; aspect-ratio:16/9;"
>}}
{{< card {{< card
link="https://github.com/infracourse/web" link="https://github.com/infracourse/web"
title="Stanford CS 40" title="Stanford CS 40"

View File

@ -13,6 +13,13 @@ layout: wide
{{< cards >}} {{< cards >}}
{{< card
link="https://github.com/axivo/website"
title="AXIVO Docs"
image="https://github.com/imfing/hextra/assets/19806136/f22f0710-23a0-430b-8bad-616283b8a3e5"
imageStyle="object-fit:cover; aspect-ratio:16/9;"
>}}
{{< card {{< card
link="https://github.com/infracourse/web" link="https://github.com/infracourse/web"
title="Stanford CS 40" title="Stanford CS 40"

14
i18n/he.yaml Normal file
View File

@ -0,0 +1,14 @@
backToTop: "גלול למעלה"
changeLanguage: "שנה שפה"
changeTheme: "שנה ערכת צבעים"
copyCode: "העתק קוד"
copyright: "© 2024 פרוייקט Hextra"
dark: "כהה"
editThisPage: "← ערוך עמוד זה בגיטהאב"
lastUpdated: "עודכן לאחרונה ב"
light: "בהיר"
noResultsFound: "לא נמצאו תוצאות."
onThisPage: "בעמוד זה"
poweredBy: "Hextra מופעל על-ידי"
readMore: "← קרא עוד"
searchPlaceholder: "חיפוש..."

14
i18n/nl.yaml Normal file
View File

@ -0,0 +1,14 @@
backToTop: "Terug naar boven"
changeLanguage: "Taal veranderen"
changeTheme: "Thema aanpassen"
copyCode: "Kopieer code"
copyright: "© 2024 Hextra Project."
dark: "Donker"
editThisPage: "Bewerk deze pagina op GitHub →"
lastUpdated: "Laatst bijgewerkt op"
light: "Licht"
noResultsFound: "Geen resultaten gevonden."
onThisPage: "Op deze pagina"
poweredBy: "Mogelijk gemaakt door Hextra"
readMore: "Lees meer →"
searchPlaceholder: "Zoeken..."

14
i18n/uk.yaml Normal file
View File

@ -0,0 +1,14 @@
backToTop: "Прокрутити до початку"
changeLanguage: "Змінити мову"
changeTheme: "Змінити тему"
copyCode: "Скопіювати код"
copyright: "2024 Проєкт Hextra."
dark: "Темна"
editThisPage: "Редагувати цю сторінку на Github →"
lastUpdated: "Востаннє оновлено"
light: "Світла"
noResultsFound: "Не знайдено результатів"
onThisPage: "На цій сторінці"
poweredBy: "Працює завдяки Hextra"
readMore: "Читати більше →"
searchPlaceholder: "Пошук..."

View File

@ -1,13 +1,15 @@
<div class="hx-mt-1.5 hx-flex hx-items-center hx-gap-1 hx-overflow-hidden hx-text-sm hx-text-gray-500 dark:hx-text-gray-400 contrast-more:hx-text-current"> {{- if (default true .Params.breadcrumbs) }}
{{- range .Ancestors.Reverse }} <div class="hx-mt-1.5 hx-flex hx-items-center hx-gap-1 hx-overflow-hidden hx-text-sm hx-text-gray-500 dark:hx-text-gray-400 contrast-more:hx-text-current">
{{- if not .IsHome }} {{- range .Ancestors.Reverse }}
<div class="hx-whitespace-nowrap hx-transition-colors hx-min-w-[24px] hx-overflow-hidden hx-text-ellipsis hover:hx-text-gray-900 dark:hover:hx-text-gray-100"> {{- if not .IsHome }}
<a href="{{ .Permalink }}">{{- partial "utils/title" . -}}</a> <div class="hx-whitespace-nowrap hx-transition-colors hx-min-w-[24px] hx-overflow-hidden hx-text-ellipsis hover:hx-text-gray-900 dark:hover:hx-text-gray-100">
</div> <a href="{{ .RelPermalink }}">{{- partial "utils/title" . -}}</a>
{{- partial "utils/icon.html" (dict "name" "chevron-right" "attributes" "class=\"hx-w-3.5 hx-shrink-0 rtl:-hx-rotate-180\"") -}} </div>
{{- partial "utils/icon.html" (dict "name" "chevron-right" "attributes" "class=\"hx-w-3.5 hx-shrink-0 rtl:-hx-rotate-180\"") -}}
{{ end -}}
{{ end -}} {{ end -}}
{{ end -}} <div class="hx-whitespace-nowrap hx-transition-colors hx-font-medium hx-text-gray-700 contrast-more:hx-font-bold contrast-more:hx-text-current dark:hx-text-gray-100 contrast-more:dark:hx-text-current">
<div class="hx-whitespace-nowrap hx-transition-colors hx-font-medium hx-text-gray-700 contrast-more:hx-font-bold contrast-more:hx-text-current dark:hx-text-gray-100 contrast-more:dark:hx-text-current"> {{- partial "utils/title" . -}}
{{- partial "utils/title" . -}} </div>
</div> </div>
</div> {{ end -}}

View File

@ -20,7 +20,7 @@
{{- partial "language-switch.html" (dict "context" .) -}} {{- partial "language-switch.html" (dict "context" .) -}}
{{- with $displayThemeToggle }}{{ partial "theme-toggle.html" }}{{ end -}} {{- with $displayThemeToggle }}{{ partial "theme-toggle.html" }}{{ end -}}
</div> </div>
{{- if or site.IsMultiLingual $displayThemeToggle -}} {{- if or hugo.IsMultilingual $displayThemeToggle -}}
<hr class="dark:hx-border-neutral-800" /> <hr class="dark:hx-border-neutral-800" />
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}

View File

@ -5,7 +5,7 @@
{{- $changeLanguage := (T "changeLanguage") | default "Change language" -}} {{- $changeLanguage := (T "changeLanguage") | default "Change language" -}}
{{- if site.IsMultiLingual -}} {{- if hugo.IsMultilingual -}}
<div class="hx-flex hx-justify-items-start {{ if $grow }}hx-grow{{ end }}"> <div class="hx-flex hx-justify-items-start {{ if $grow }}hx-grow{{ end }}">
<button <button
title="{{ $changeLanguage }}" title="{{ $changeLanguage }}"

View File

@ -43,9 +43,9 @@
{{ $switchesClass := cond $disableSidebar "md:hx-hidden" "" -}} {{ $switchesClass := cond $disableSidebar "md:hx-hidden" "" -}}
{{ $displayThemeToggle := (site.Params.theme.displayToggle | default true) -}} {{ $displayThemeToggle := (site.Params.theme.displayToggle | default true) -}}
{{ if or site.IsMultiLingual $displayThemeToggle }} {{ if or hugo.IsMultilingual $displayThemeToggle }}
<div class="{{ $switchesClass }} {{ with site.IsMultiLingual }}hx-justify-end{{ end }} hx-sticky hx-bottom-0 hx-bg-white dark:hx-bg-dark hx-mx-4 hx-py-4 hx-shadow-[0_-12px_16px_#fff] hx-flex hx-items-center hx-gap-2 dark:hx-border-neutral-800 dark:hx-shadow-[0_-12px_16px_#111] contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-shadow-none hx-border-t" data-toggle-animation="show"> <div class="{{ $switchesClass }} {{ with hugo.IsMultilingual }}hx-justify-end{{ end }} hx-sticky hx-bottom-0 hx-bg-white dark:hx-bg-dark hx-mx-4 hx-py-4 hx-shadow-[0_-12px_16px_#fff] hx-flex hx-items-center hx-gap-2 dark:hx-border-neutral-800 dark:hx-shadow-[0_-12px_16px_#111] contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-shadow-none hx-border-t" data-toggle-animation="show">
{{- with site.IsMultiLingual -}} {{- with hugo.IsMultilingual -}}
{{- partial "language-switch" (dict "context" $context "grow" true) -}} {{- partial "language-switch" (dict "context" $context "grow" true) -}}
{{- with $displayThemeToggle }}{{ partial "theme-toggle" (dict "hideLabel" true) }}{{ end -}} {{- with $displayThemeToggle }}{{ partial "theme-toggle" (dict "hideLabel" true) }}{{ end -}}
{{- else -}} {{- else -}}

View File

@ -0,0 +1,38 @@
{{- $class := .Get "class" -}}
{{- $cols := .Get "cols" | default 2 -}}
{{- $image := .Get "image" -}}
{{- $imageCard := .Get "imageCard" | default false -}}
{{- $imageClass := .Get "imageClass" -}}
{{- $imageLink := .Get "imageLink" -}}
{{- $imageLinkExternal := hasPrefix $imageLink "http" -}}
{{- $imageStyle := .Get "imageStyle" -}}
{{- $imageTitle := .Get "imageTitle" -}}
{{- $imageWidth := .Get "imageWidth" | default 350 -}}
{{- $imageHeight := .Get "imageHeight" | default 350 -}}
{{- $style := .Get "style" -}}
{{- $css := printf "--hextra-feature-grid-cols: %v; %s" $cols $style -}}
{{- $href := cond (hasPrefix $imageLink "/") ($imageLink | relURL) $imageLink -}}
{{- if hasPrefix $image "/" -}}
{{- $image = relURL (strings.TrimPrefix "/" $image) -}}
{{- end -}}
<div
class="{{ $class }} hextra-feature-grid hx-grid sm:max-lg:hx-grid-cols-2 max-sm:hx-grid-cols-1 hx-gap-4 hx-w-full not-prose"
{{ with $css }}style="{{ . | safeCSS }}"{{ end }}
>
<div class="hx-w-full">
{{ .Inner }}
</div>
{{- with $image }}
<div class="hx-mx-auto">
<a
{{ with $imageLink }}href="{{ $href }}" {{ with $imageLinkExternal }} target="_blank" rel="noreferrer"{{ end }}{{ end }}
{{ with $imageStyle }}style="{{ . | safeCSS }}"{{ end }}
class="{{ $imageClass }} {{ if $imageCard }}hextra-feature-card not-prose hx-block hx-relative hx-p-6 hx-overflow-hidden hx-rounded-3xl hx-border hx-border-gray-200 hover:hx-border-gray-300 dark:hx-border-neutral-800 dark:hover:hx-border-neutral-700 before:hx-pointer-events-none before:hx-absolute before:hx-inset-0 before:hx-bg-glass-gradient{{ end }}"
>
<img src="{{ $image }}" width="{{ $imageWidth }}" height="{{ $imageHeight }}" {{ with $imageTitle }}alt="{{ $imageTitle }}"{{ end }}/>
</a>
</div>
{{ end -}}
</div>

View File

@ -7,4 +7,6 @@ command = "cd exampleSite && hugo --gc --minify --themesDir ../.. -b ${DEPLOY_PR
ignore = "false" ignore = "false"
[build.environment] [build.environment]
HUGO_VERSION = "0.117.0" HUGO_VERSION = "0.126.1"
GO_VERSION = "1.22.3"
NODE_VERSION = "22.2.0"

View File

@ -9,7 +9,7 @@ homepage = "https://github.com/imfing/hextra/"
demosite = "https://imfing.github.io/hextra/" demosite = "https://imfing.github.io/hextra/"
tags = ["Modern", "Elegant", "Blog", "Documentation", "Responsive", "Clean", "Light", "Dark", "Minimal"] tags = ["Modern", "Elegant", "Blog", "Documentation", "Responsive", "Clean", "Light", "Dark", "Minimal"]
features = ["Responsive", "Dark Mode", "Search", "Syntax Highlighting", "Multilingual", "Social", "Blog", "RSS", "Customization"] features = ["Responsive", "Dark Mode", "Search", "Syntax Highlighting", "Multilingual", "Social", "Blog", "RSS", "Customization"]
min_version = "0.111.0" min_version = "0.124.0"
[author] [author]
name = "Xin" name = "Xin"