Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 10 additions & 0 deletions docs/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,13 @@
.hextra-footer .social-media :hover{
transform: translateY(-2px);
}

.hextra-banner {
background: #6BB43A;
background: linear-gradient(135deg, rgba(107, 180, 58, 1) 0%, rgba(29, 253, 253, 1) 50%, rgba(69, 145, 252, 1) 100%);
color: var(--hx-color-slate-900);
}

.extra-banner-close-button {
color: var(--hx-color-slate-50);
}
6 changes: 3 additions & 3 deletions docs/content/docs/formatters/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ golangci-lint formatters
## All formatters

{{< golangci/items/filter >}}
{{< golangci/items/filter-badge class="gl-filter" data="new" icon="fire" content="New" type="warning" >}}
{{< golangci/items/filter-badge class="gl-filter" data="deprecated" icon="emoji-sad" content="Deprecated" type="info" >}}
{{< golangci/items/filter-badge class="gl-filter-reset gl-hidden" icon="trash" content="Reset" type="error" border=true >}}
{{< golangci/items/filter-badge class="gl-filter" data="new" icon="fire" content="New" color="yellow" >}}
{{< golangci/items/filter-badge class="gl-filter" data="deprecated" icon="emoji-sad" content="Deprecated" color="blue" >}}
{{< golangci/items/filter-badge class="gl-filter-reset gl-hidden" icon="trash" content="Reset" color="red" border=true >}}
{{< /golangci/items/filter >}}

{{< cards >}}
Expand Down
10 changes: 5 additions & 5 deletions docs/content/docs/linters/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ golangci-lint linters
## All Linters

{{< golangci/items/filter >}}
{{< golangci/items/filter-badge class="gl-filter" data="default" icon="inbox" content="Default" type="info" >}}
{{< golangci/items/filter-badge class="gl-filter" data="new" icon="fire" content="New" type="warning" >}}
{{< golangci/items/filter-badge class="gl-filter" data="autofix" icon="sparkles" content="Autofix" type="info" >}}
{{< golangci/items/filter-badge class="gl-filter" data="default" icon="inbox" content="Default" color="indigo" >}}
{{< golangci/items/filter-badge class="gl-filter" data="new" icon="fire" content="New" color="yellow" >}}
{{< golangci/items/filter-badge class="gl-filter" data="autofix" icon="sparkles" content="Autofix" color="blue" >}}
{{< golangci/items/filter-badge class="gl-filter" data="fast" icon="fast-forward" content="Fast" >}}
{{< golangci/items/filter-badge class="gl-filter" data="slow" icon="play" content="Slow" >}}
{{< golangci/items/filter-badge class="gl-filter" data="deprecated" icon="emoji-sad" content="Deprecated" type="info" >}}
{{< golangci/items/filter-badge class="gl-filter-reset gl-hidden" icon="trash" content="Reset" type="error" border=true >}}
{{< golangci/items/filter-badge class="gl-filter" data="deprecated" icon="emoji-sad" content="Deprecated" color="blue" >}}
{{< golangci/items/filter-badge class="gl-filter-reset gl-hidden" icon="trash" content="Reset" color="red" border=true >}}
{{< /golangci/items/filter >}}

{{< cards >}}
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/plugins/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ weight: 7
---

{{< cards >}}
{{< card link="/docs/plugins/module-plugins/" title="Module Plugin System" icon="puzzle" tag="Recommended" tagType="icon-only:sparkles" >}}
{{< card link="/docs/plugins/module-plugins/" title="Module Plugin System" icon="puzzle" tag="Recommended" tagColor="icon-only:sparkles" >}}
{{< card link="/docs/plugins/go-plugins/" title="Go Plugin System" icon="puzzle" >}}
{{< /cards >}}
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.24.0

require github.com/imfing/hextra v0.10.2 // indirect
require github.com/imfing/hextra v0.11.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.

5 changes: 5 additions & 0 deletions docs/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ menu:
params:
description: Golangci-lint is a fast linters runner for Go.

banner:
key: 'announcement-v2_4'
message: |
New golangci-lint release ([v2.4](/docs/product/changelog/)) with support of Go 1.25 🎉🎉🎉 It's time to [support us](/docs/donate/) to keep golangci-lint always up to date!
navbar:
displayTitle: true
displayLogo: true
Expand Down
37 changes: 26 additions & 11 deletions docs/layouts/_partials/shortcodes/badge.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_partials/shortcodes/badge.html */ -}}
{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.11.0/layouts/_partials/shortcodes/badge.html */ -}}
{{- /* This file overrides the badge partial of the theme */ -}}

{{- $content := .content -}}
{{- $type := .type | default "" -}}
{{- $color := .color | default .type | default "" -}}{{- /* Compatibility with previous parameter. */ -}}
{{- $class := .class | default "" -}}
{{- $border := .border | default false -}}
{{- $icon := .icon | default "" -}}
{{- $data := .data | default "" -}}

{{- $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" -}}
{{- /* Compatibility with previous names. */ -}}
{{- $mapping := (dict
"default" "gray"
"tip" "green"
"info" "blue"
"warning" "yellow"
"error" "red"
"important" "purple"
)
-}}
{{- $color = index $mapping $color | default $color | default "gray" -}}

{{- $styleClass := newScratch -}}
{{- $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" -}}
{{- $styleClass.Set "gray" "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.Set "purple" "hx:border-purple-200 hx:bg-purple-100 hx:text-purple-900 hx:dark:border-purple-200/30 hx:dark:bg-purple-900/30 hx:dark:text-purple-200" -}}
{{- $styleClass.Set "indigo" "hx:border-indigo-200 hx:bg-indigo-100 hx:text-indigo-900 hx:dark:border-indigo-200/30 hx:dark:bg-indigo-900/30 hx:dark:text-indigo-200" -}}
{{- $styleClass.Set "blue" "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 "green" "hx:border-green-200 hx:bg-green-100 hx:text-green-900 hx:dark:border-green-200/30 hx:dark:bg-green-900/30 hx:dark:text-green-200" -}}
{{- $styleClass.Set "yellow" "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 "orange" "hx:border-orange-100 hx:bg-orange-50 hx:text-orange-800 hx:dark:border-orange-400/30 hx:dark:bg-orange-400/20 hx:dark:text-orange-300" -}}
{{- $styleClass.Set "amber" "hx:border-amber-200 hx:bg-amber-100 hx:text-amber-900 hx:dark:border-amber-200/30 hx:dark:bg-amber-900/30 hx:dark:text-amber-200" -}}
{{- $styleClass.Set "red" "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" "" -}}
{{- $badgeClass := or ($styleClass.Get $type) $defaultClass -}}
{{- $badgeClass := or ($styleClass.Get $color) ($styleClass.Get "gray") -}}

{{- /* Custom section to handle icon-only badges. */ -}}
{{- $iconOnly := hasPrefix $type "icon-only" -}}
{{- $iconOnly := hasPrefix $color "icon-only" -}}
{{- if $iconOnly -}}
{{- $icon = (strings.TrimPrefix "icon-only:" $type) -}}
{{- $icon = (strings.TrimPrefix "icon-only:" $color) -}}
{{- $borderClass = "" -}}
{{- $defaultClass = "" -}}
{{- $badgeClass = "hx:p-2" -}}
{{- end -}}

{{- /* Custom section to set attributes. */ -}}
{{- $data := .data | default "" -}}
{{- $attributes := slice -}}
{{- if $iconOnly -}}
{{- $attributes = $attributes | append (printf `title="%s"` $content) -}}
Expand Down
4 changes: 2 additions & 2 deletions docs/layouts/_shortcodes/golangci/items/filter-badge.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/}}

{{- $content := .Get "content" -}}
{{- $type := .Get "type" | default "" -}}
{{- $color := .Get "color" | default "" -}}
{{- $data := .Get "data" | default "" -}}
{{- $class := .Get "class" | default "" -}}
{{- $icon := .Get "icon" | default "" -}}
Expand All @@ -23,7 +23,7 @@
"data" $data
"class" (printf "hx:mt-2 hx:mx-1 hx:cursor-pointer %s" $class)
"content" $content
"type" $type
"color" $color
"border" $border
"icon" $icon
)
Expand Down
6 changes: 3 additions & 3 deletions docs/layouts/_shortcodes/golangci/items/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"icon" "sparkles"
"class" "hx:mx-1"
"content" (print "Deprecated since " .deprecation.since)
"type" "error"
"color" "red"
)
}}
{{ else }}
Expand All @@ -57,7 +57,7 @@
"icon" "sparkles"
"class" "hx:mx-1"
"content" "New"
"type" "warning"
"color" "yellow"
)
}}
{{ end }}
Expand All @@ -67,7 +67,7 @@
"icon" "sparkles"
"class" "hx:mx-1"
"content" "Autofix"
"type" "info"
"color" "blue"
)
}}
{{ end }}
Expand Down
Loading