Skip to content

dev: update to Hextra v0.10.0 #6007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 15, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

/* Allow card subtitle with more than 3 lines */
.hx-line-clamp-3.hextra-card-subtitle {
.hx\:line-clamp-3.hextra-card-subtitle {
-webkit-line-clamp: 30;
}

Expand Down
10 changes: 5 additions & 5 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ params:

{{< hextra/hero-container image="images/golangci-lint-logo-anim.gif" imageWidth="300" imageHeight="300" imageTitle="golangci-lint" >}}

<div class="hx-mt-6 hx-mb-6">
<div class="hx:mt-6 hx:mb-6">
{{< hextra/hero-headline >}}
Golangci-lint is a fast linters runner for Go
{{< /hextra/hero-headline >}}
</div>

<div class="hx-mb-12">
<div class="hx:mb-12">
{{< hextra/hero-subtitle >}}
It runs linters in parallel, uses caching, supports YAML configuration,&nbsp;<br class="sm:hx-block hx-hidden" />integrates with all major IDEs, and includes over a hundred linters.
It runs linters in parallel, uses caching, supports YAML configuration,&nbsp;<br class="hx:sm:block hx:hidden" />integrates with all major IDEs, and includes over a hundred linters.
{{< /hextra/hero-subtitle >}}
</div>

<div class="hx-mb-6">
<div class="hx:mb-6">
{{< hextra/hero-button text="Get Started" link="docs" >}}
</div>

{{< /hextra/hero-container >}}

<div class="hx-mt-6"></div>
<div class="hx:mt-6"></div>

{{< hextra/feature-grid cols=3 >}}
{{< hextra/feature-card
Expand Down
17 changes: 2 additions & 15 deletions docs/content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ Golangci-lint is a free and open-source project built by volunteers.

If you value it, consider supporting us, we appreciate it!

<div class="hx-mt-6 hx-mb-6">
{{< hextra/hero-button text="Donate ❤️" link="/docs/donate" >}}
</div>
{{< button text="Donate ❤️" link="/docs/donate" >}}

## Contributors

Expand All @@ -44,15 +42,4 @@ This project exists thanks to all the people who contribute. [How to contribute]

## Stargazers over time

<a href="https://starchart.cc/golangci/golangci-lint">
<img
title="Stargazers over time"
src="https://starchart.cc/golangci/golangci-lint.svg"
class="hx-block dark:hx-hidden"
/>
<img
title="Stargazers over time"
src="https://starchart.cc/golangci/golangci-lint.svg?variant=dark"
class="hx-hidden dark:hx-block"
/>
</a>
{{< starcharts repo="golangci/golangci-lint" >}}
4 changes: 1 addition & 3 deletions docs/content/docs/product/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint)

If you value it, consider supporting us, we appreciate it!

<div class="hx-mt-6 hx-mb-6">
{{< hextra/hero-button text="Donate ❤️" link="/docs/donate" >}}
</div>
{{< button text="Donate ❤️" link="/docs/donate" >}}

{{% embed file=".tmp/raw_changelog.tmp" %}}
2 changes: 1 addition & 1 deletion docs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/golangci/docs

go 1.23.0

require github.com/imfing/hextra v0.9.7 // indirect
require github.com/imfing/hextra v0.10.0 // indirect
4 changes: 2 additions & 2 deletions docs/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion docs/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ params:
enable: true
displayCopyright: false
displayPoweredBy: true
width: normal
width: wide
links:
- title: Bluesky
url: "https://bsky.app/profile/golangci-lint.run"
Expand Down Expand Up @@ -158,3 +158,5 @@ params:
page:
# full (100%), wide (90rem), normal (80rem)
width: full
tabs:
sync: false
14 changes: 7 additions & 7 deletions docs/layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{{ define "main" }}
<div class='hx-mx-auto hx-flex {{ partial "utils/page-width" . }}'>
<div class='hx:mx-auto hx:flex hextra-max-page-width'>
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }}
{{ partial "toc.html" . }}
<article class="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<article class="hx:w-full hx:break-words hx:flex hx:min-h-[calc(100vh-var(--navbar-height))] hx:min-w-0 hx:justify-center hx:pb-8 hx:pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<main
class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-flex hx-flex-col hx-items-center hx-justify-center">
<div class="hx-flex hx-flex-col hx-items-center hx-justify-center">
class="hx:w-full hx:min-w-0 hx:max-w-6xl hx:flex hx:flex-col hx:items-center hx:justify-center">
<div class="hx:flex hx:flex-col hx:items-center hx:justify-center">
<a href="/" ><img src="/images/logo-circle.svg" alt="logo" width="200" height="200"></a>
<h1 id="error-heading"
class="not-prose hx-text-4xl font-bold leading-none tracking-tighter md:text-5xl py-2 bg-clip-text text-transparent bg-gradient-to-r from-gray-900 to-gray-600 dark:from-gray-100 dark:to-gray-400">
class="not-prose hx:text-4xl font-bold leading-none tracking-tighter md:text-5xl py-2 bg-clip-text text-transparent bg-gradient-to-r from-gray-900 to-gray-600 dark:from-gray-100 dark:to-gray-400">
404
</h1>
<p class="hx-mb-6">
<p class="hx:mb-6">
The page could not be found.
</p>
<a href="/" class="hx-font-medium hx-px-6 hx-py-3 hx-text-center inline-block">
<a href="/" class="hx:font-medium hx:px-6 hx:py-3 hx:text-center inline-block">
Go to the home page
</a>
</div>
Expand Down
19 changes: 8 additions & 11 deletions docs/layouts/_partials/clickable-badge.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/partials/shortcodes/badge.html */ -}}
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_partials/shortcodes/badge.html */ -}}
{{- /*
Creates a badge with the given id and class.

Expand All @@ -18,20 +18,17 @@
{{- $border := .border | default false -}}
{{- $icon := .icon | default "" -}}

{{- $defaultClass := "hx-text-gray-600 hx-bg-gray-100 dark:hx-bg-neutral-800 dark:hx-text-neutral-200 hx-border-gray-200 dark:hx-border-neutral-700" -}}
{{- $defaultClass := "hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700" -}}

{{- $styleClass := newScratch -}}
{{- $styleClass.Set "info" "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" -}}
{{- $styleClass.Set "warning" "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" -}}
{{- $styleClass.Set "error" "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" -}}
{{- $styleClass.Set "green" "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" -}}
{{- $styleClass.Set "indigo" "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" -}}
{{- $styleClass.Set "amber" "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" -}}
{{- $styleClass.Set "info" "hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200" -}}
{{- $styleClass.Set "warning" "hx:border-yellow-100 hx:bg-yellow-50 hx:text-yellow-900 hx:dark:border-yellow-200/30 hx:dark:bg-yellow-700/30 hx:dark:text-yellow-200" -}}
{{- $styleClass.Set "error" "hx:border-red-200 hx:bg-red-100 hx:text-red-900 hx:dark:border-red-200/30 hx:dark:bg-red-900/30 hx:dark:text-red-200" -}}

{{- $borderClass := cond (eq $border true) "hx-border" "" -}}
{{- $borderClass := cond (eq $border true) "hx:border" "" -}}
{{- $badgeClass := or ($styleClass.Get $type) $defaultClass -}}
<div class="hextra-badge hx-mt-2 hx-mx-1">
<div id="{{ $id }}" class="hx-inline-flex hx-gap-1 hx-items-center hx-rounded-full hx-px-2.5 hx-leading-6 hx-text-[.65rem] hx-cursor-pointer {{ $borderClass }} {{ $badgeClass }} {{ $class }}">
<div class="hextra-badge hx:mt-2 hx:mx-1">
<div id="{{ $id }}" class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:cursor-pointer {{ $borderClass }} {{ $badgeClass }} {{ $class }}">
{{- with $icon -}}{{- partial "utils/icon" (dict "name" . "attributes" "height=12") -}}{{- end -}}
{{- $content -}}
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/layouts/_partials/custom-cards.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{/* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/partials/shortcodes/cards.html */}}
{{/* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_partials/shortcodes/cards.html */}}
{{- $cols := .cols | default 3 -}}
{{- $content := .content -}}
{{- $mainClass := .mainClass | default "hextra-cards" -}}

<div class="{{$mainClass}} hx-mt-4 hx-gap-4 hx-grid not-prose" style="--hextra-cards-grid-cols: {{ $cols }};">
<div class="{{$mainClass}} hx:mt-4 hx:gap-4 hx:grid not-prose" style="--hextra-cards-grid-cols: {{ $cols }};">
{{- $content -}}
</div>
2 changes: 1 addition & 1 deletion docs/layouts/_partials/custom/head-end.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
return
}

const borderClass = 'hx-border'
const borderClass = 'hx:border'
const hiddenClass = 'gl-hidden'

document.querySelectorAll('.gl-filter').forEach(button => {
Expand Down
33 changes: 12 additions & 21 deletions docs/layouts/_partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/partials/footer.html */ -}}
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_partials/footer.html */ -}}
{{- $enableFooterSwitches := .Scratch.Get "enableFooterSwitches" | default false -}}
{{- $displayThemeToggle := site.Params.theme.displayToggle | default true -}}
{{- $footerSwitchesVisible := and $enableFooterSwitches (or hugo.IsMultilingual $displayThemeToggle) -}}
Expand All @@ -7,45 +7,36 @@
{{- $copyright := (T "copyright") | default "© 2024 Hextra." -}}
{{- $poweredBy := (T "poweredBy") | default "Powered by Hextra" -}}

{{- $footerWidth := "hx-max-w-screen-xl" -}}
{{- with .Site.Params.footer.width -}}
{{ if eq . "wide" -}}
{{ $footerWidth = "hx-max-w-[90rem]" -}}
{{ else if eq . "full" -}}
{{ $footerWidth = "max-w-full" -}}
{{ end -}}
{{- end -}}

<footer class="hextra-footer hx-bg-gray-100 hx-pb-[env(safe-area-inset-bottom)] dark:hx-bg-neutral-900 print:hx-bg-transparent">
<footer class="hextra-footer hx:bg-gray-100 hx:pb-[env(safe-area-inset-bottom)] hx:dark:bg-neutral-900 hx:print:bg-transparent">
{{- if $footerSwitchesVisible -}}
<div class="hx-mx-auto hx-flex hx-gap-2 hx-py-2 hx-px-4 {{ $footerWidth }}">
<div class="hx:mx-auto hx:flex hx:gap-2 hx:py-2 hx:px-4 hextra-max-footer-width">
{{- partial "language-switch.html" (dict "context" .) -}}
{{- with $displayThemeToggle }}{{ partial "theme-toggle.html" }}{{ end -}}
</div>
{{- if or hugo.IsMultilingual $displayThemeToggle -}}
<hr class="dark:hx-border-neutral-800" />
<hr class="hx:border-gray-200 hx:dark:border-neutral-800" />
{{- end -}}
{{- end -}}

{{- if $copyrightSectionVisible -}}
<div class="hx-mx-auto hx-flex hx-items-center hx-justify-end hx-gap-2 hx-h-16 hx-px-6 hx-max-w-[90rem] hx-text-gray-600 dark:hx-text-gray-400">
<div class="hextra-max-footer-width hx:mx-auto hx:mx-auto hx:flex hx:items-center hx:justify-end hx:gap-2 hx:h-16 hx:px-6 hx:text-gray-600 hx:dark:text-gray-400 hx:md:justify-start">

<div class="hx-flex hx-items-center ltr:hx-mr-auto rtl:hx-ml-auto" >
<div class="hx:flex hx:w-full hx:flex-col hx:items-center hx:sm:items-start" >

{{- if .Site.Params.footer.displayCopyright }}
<span class="hx-mr-2 hx-inline">{{ $copyright | markdownify }}</span>
<span class="hx:mr-2 hx:inline">{{ $copyright | markdownify }}</span>
{{- end -}}

{{- if (.Site.Params.footer.displayPoweredBy | default true) }}
<span class="hx-mr-2 hx-inline">{{ template "theme-credit" $poweredBy }}</span>
<span class="hx:mr-2 hx:inline">{{ template "theme-credit" $poweredBy }}</span>
{{- end -}}

</div>

{{- range .Site.Params.footer.links -}}
{{- $external := strings.HasPrefix .url "http" -}}
<a title="{{ .title }}" href="{{ .url }}" {{ if $external }}target="_blank"{{ end }} class="hx-text-sm contrast-more:hx-text-gray-700 contrast-more:dark:hx-text-gray-100 hx-relative -hx-ml-2 hx-whitespace-nowrap hx-p-2 md:hx-inline-block hx-text-gray-600 hover:hx-text-gray-800 dark:hx-text-gray-400 dark:hover:hx-text-gray-200">
<span class="hx-text-center">
<a title="{{ .title }}" href="{{ .url }}" {{ if $external }}target="_blank"{{ end }} class="hx:text-sm hx:contrast-more:text-gray-700 hx:contrast-more:dark:text-gray-100 hx:relative -hx:ml-2 hx:whitespace-nowrap hx:p-1 hx:md:inline-block hx:text-gray-600 hx:hover:text-gray-800 hx:dark:text-gray-400 hx:dark:hover:text-gray-200">
<span class="hx:text-center">
{{- partial "utils/icon.html" (dict "name" .icon "attributes" "height=20") -}}
</span>
</a>
Expand All @@ -56,11 +47,11 @@
</footer>

{{- define "theme-credit" -}}
<a class="hx-flex hx-text-sm hx-items-center hx-gap-1 hx-text-current" target="_blank" rel="noopener noreferrer" title="Hextra GitHub Homepage" href="https://github.com/imfing/hextra">
<a class="hx:flex hx:text-sm hx:items-center hx:gap-1 hx:text-current" target="_blank" rel="noopener noreferrer" title="Hextra GitHub Homepage" href="https://github.com/imfing/hextra">
<span>
{{- . | markdownify -}}
{{- if strings.Contains . "Hextra" -}}
{{- partial "utils/icon.html" (dict "name" "hextra" "attributes" `height=1em class="hx-inline-block ltr:hx-ml-1 rtl:hx-mr-1 hx-align-[-2.5px]"`) -}}
{{- partial "utils/icon.html" (dict "name" "hextra" "attributes" `height=1em class="hx:inline-block hx:ltr:ml-1 hx:rtl:mr-1 hx:align-[-2.5px]"`) -}}
{{- end -}}
</span>
</a>
Expand Down
31 changes: 0 additions & 31 deletions docs/layouts/_partials/utils/extract-headings.html

This file was deleted.

55 changes: 0 additions & 55 deletions docs/layouts/_partials/utils/fragments.html

This file was deleted.

17 changes: 17 additions & 0 deletions docs/layouts/_shortcodes/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- $link := .Get "link" -}}
{{- $text := .Get "text" -}}
{{- $style := .Get "style" -}}

{{- $external := hasPrefix $link "http" -}}
{{- $href := cond (hasPrefix $link "/") ($link | relURL) $link -}}

<div class="hx:mt-6 hx:mb-6">
<a
href="{{ $href }}"
class="not-prose hx:font-medium hx:cursor-pointer hx:px-6 hx:py-3 hx:rounded-full hx:text-center hx:text-white hx:inline-block hx:bg-primary-600 hx:hover:bg-primary-700 hx:focus:outline-hidden hx:focus:ring-4 hx:focus:ring-primary-300 hx:dark:bg-primary-600 hx:dark:hover:bg-primary-700 hx:dark:focus:ring-primary-800 hx:transition-all hx:ease-in hx:duration-200"
{{ with $style }}style="{{ . | safeCSS }}"{{ end }}
{{ if $external }}target="_blank" rel="noreferrer"{{ end -}}
>
{{- $text -}}
</a>
</div>
2 changes: 1 addition & 1 deletion docs/layouts/_shortcodes/clickable-badge.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/shortcodes/badge.html */ -}}
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_shortcodes/badge.html */ -}}
{{- /*
Creates a badge with the given id and class.

Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/_shortcodes/custom-cards.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/shortcodes/cards.html */ -}}
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_shortcodes/cards.html */ -}}
{{- /*
Creates a card for each author of a linter/formatter.

Expand Down
10 changes: 5 additions & 5 deletions docs/layouts/_shortcodes/details.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.9.7/layouts/shortcodes/details.html */ -}}
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_shortcodes/details.html */ -}}
{{- $title := .Get "title" | default "" -}}
{{- $closed := eq (.Get "closed") "true" | default false -}}

<details class="last-of-type:hx-mb-0 hx-rounded-lg hx-bg-neutral-50 dark:hx-bg-neutral-800 hx-p-2 hx-mt-4 hx-group" {{ if not $closed }}open{{ end }}>
<summary class="hx-flex hx-items-center hx-cursor-pointer hx-select-none hx-list-none hx-p-1 hx-rounded hx-transition-colors hover:hx-bg-gray-100 dark:hover:hx-bg-neutral-800 before:hx-mr-1 before:hx-inline-block before:hx-transition-transform before:hx-content-[''] dark:before:hx-invert rtl:before:hx-rotate-180 group-open:before:hx-rotate-90">
<span class="hx-text-lg">{{ $title | markdownify }}</span>
<details class="hx:last-of-type:mb-0 hx:rounded-lg hx:bg-neutral-50 hx:dark:bg-neutral-800 hx:p-2 hx:mt-4 hx:group" {{ if not $closed }}open{{ end }}>
<summary class="hx:flex hx:items-center hx:cursor-pointer hx:select-none hx:list-none hx:p-1 hx:rounded-sm hx:transition-colors hx:hover:bg-gray-100 hx:dark:hover:bg-neutral-800 hx:before:mr-1 hx:before:inline-block hx:before:transition-transform hx:before:content-[''] hx:dark:before:invert hx:rtl:before:rotate-180 hx:group-open:before:rotate-90">
<span class="hx:text-lg">{{ $title | markdownify }}</span>
</summary>
<div class="hx-p-2 hx-overflow-hidden">
<div class="hx:p-2 hx:overflow-hidden">
{{ .InnerDeindent | markdownify }}
</div>
</details>
Loading
Loading