Skip to content

Commit 6368acb

Browse files
committed
dev: item namespace
1 parent 5b035f8 commit 6368acb

File tree

13 files changed

+51
-51
lines changed

13 files changed

+51
-51
lines changed

docs/content/docs/formatters/_index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ golangci-lint formatters
2727

2828
## All formatters
2929

30-
{{< golangci/filter-bar >}}
31-
{{< golangci/clickable-badge class="gl-filter" id="new-filter" icon="fire" content="New" type="warning" >}}
32-
{{< golangci/clickable-badge class="gl-filter" id="deprecated-filter" icon="emoji-sad" content="Deprecated" type="info" >}}
33-
{{< golangci/clickable-badge class="gl-filter-reset gl-hidden" id="reset-filter" icon="trash" content="Reset" type="error" border=true >}}
34-
{{< /golangci/filter-bar >}}
30+
{{< golangci/items/filter >}}
31+
{{< golangci/items/clickable-badge class="gl-filter" id="new-filter" icon="fire" content="New" type="warning" >}}
32+
{{< golangci/items/clickable-badge class="gl-filter" id="deprecated-filter" icon="emoji-sad" content="Deprecated" type="info" >}}
33+
{{< golangci/items/clickable-badge class="gl-filter-reset gl-hidden" id="reset-filter" icon="trash" content="Reset" type="error" border=true >}}
34+
{{< /golangci/items/filter >}}
3535

3636
{{< cards >}}
37-
{{< golangci/item-cards path="formatters" data="formatters_info" >}}
37+
{{< golangci/items/cards path="formatters" data="formatters_info" >}}
3838
{{< /cards >}}

docs/content/docs/formatters/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ title: Settings
33
weight: 2
44
---
55

6-
{{% golangci/item-settings info="formatters_info" settings="formatter_settings" %}}
6+
{{% golangci/items/settings info="formatters_info" settings="formatter_settings" %}}

docs/content/docs/linters/_index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ golangci-lint linters
2727

2828
## All Linters
2929

30-
{{< golangci/filter-bar >}}
31-
{{< golangci/clickable-badge class="gl-filter" id="default-filter" icon="inbox" content="Default" type="info" >}}
32-
{{< golangci/clickable-badge class="gl-filter" id="new-filter" icon="fire" content="New" type="warning" >}}
33-
{{< golangci/clickable-badge class="gl-filter" id="autofix-filter" icon="sparkles" content="Autofix" type="info" >}}
34-
{{< golangci/clickable-badge class="gl-filter" id="fast-filter" icon="fast-forward" content="Fast" >}}
35-
{{< golangci/clickable-badge class="gl-filter" id="slow-filter" icon="play" content="Slow" >}}
36-
{{< golangci/clickable-badge class="gl-filter" id="deprecated-filter" icon="emoji-sad" content="Deprecated" type="info" >}}
37-
{{< golangci/clickable-badge class="gl-filter-reset gl-hidden" icon="trash" id="reset-filter" content="Reset" type="error" border=true >}}
38-
{{< /golangci/filter-bar >}}
30+
{{< golangci/items/filter >}}
31+
{{< golangci/items/clickable-badge class="gl-filter" id="default-filter" icon="inbox" content="Default" type="info" >}}
32+
{{< golangci/items/clickable-badge class="gl-filter" id="new-filter" icon="fire" content="New" type="warning" >}}
33+
{{< golangci/items/clickable-badge class="gl-filter" id="autofix-filter" icon="sparkles" content="Autofix" type="info" >}}
34+
{{< golangci/items/clickable-badge class="gl-filter" id="fast-filter" icon="fast-forward" content="Fast" >}}
35+
{{< golangci/items/clickable-badge class="gl-filter" id="slow-filter" icon="play" content="Slow" >}}
36+
{{< golangci/items/clickable-badge class="gl-filter" id="deprecated-filter" icon="emoji-sad" content="Deprecated" type="info" >}}
37+
{{< golangci/items/clickable-badge class="gl-filter-reset gl-hidden" icon="trash" id="reset-filter" content="Reset" type="error" border=true >}}
38+
{{< /golangci/items/filter >}}
3939

4040
{{< cards >}}
41-
{{< golangci/item-cards path="linters" data="linters_info" >}}
41+
{{< golangci/items/cards path="linters" data="linters_info" >}}
4242
{{< /cards >}}

docs/content/docs/linters/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ title: Settings
33
weight: 2
44
---
55

6-
{{% golangci/item-settings info="linters_info" settings="linter_settings" %}}
6+
{{% golangci/items/settings info="linters_info" settings="linter_settings" %}}

docs/layouts/_partials/golangci/clickable-badge.html renamed to docs/layouts/_partials/golangci/items/clickable-badge.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/ -}}
1313

1414
{{- $content := .content -}}
15-
{{- $type := .type -}}
15+
{{- $type := .type | default "" -}}
1616
{{- $id := .id | default "" -}}
1717
{{- $class := .class | default "" -}}
1818
{{- $border := .border | default false -}}

docs/layouts/_partials/golangci/compare-versions.html renamed to docs/layouts/_partials/golangci/items/compare-versions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@param {string} b Version B
66
@returns {boolean}
77

8-
@example {{ partial "golangci/compare-versions.html" (dict "a" "v1.2.3" "b" "v1.2.4") }}
8+
@example {{ partial "golangci/items/compare-versions" (dict "a" "v1.2.3" "b" "v1.2.4") }}
99
*/ -}}
1010

1111
{{- $aVersion := path.Dir (replace .a "." "/") -}}

docs/layouts/_partials/golangci/format-description.html renamed to docs/layouts/_partials/golangci/items/format-description.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@param {string} (positional parameter 0) Description
55
@returns {string}
66

7-
@example {{ partial "golangci/format-description" "message" }}
7+
@example {{ partial "golangci/items/format-description" "message" }}
88
*/ -}}
99

1010
{{- $desc := . -}}

docs/layouts/_partials/golangci/item-tag.html renamed to docs/layouts/_partials/golangci/items/tag.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@param {string} (positional parameter 0) Description
55
@returns {map[tag: string, tagType: string]}
66

7-
@example {{ partial "golangci/item-tag.html" (dict "gcilVersion" "v1.2.3" "item" .) }}
7+
@example {{ partial "golangci/items/tag" (dict "gcilVersion" "v1.2.3" "item" .) }}
88
*/ -}}
99

1010
{{- $gcilVersion := .gcilVersion -}}
@@ -21,7 +21,7 @@
2121
{{- $tag.SetInMap "options" "subtitle" (print (strings.FirstUpper $item.deprecation.message) $replacement) -}}
2222
{{- $tag.SetInMap "options" "tag" (print "Deprecated since " $item.deprecation.since) -}}
2323
{{- $tag.SetInMap "options" "tagType" "error" -}}
24-
{{- else if (partial "golangci/compare-versions.html" (dict "a" $gcilVersion "b" $item.since)) -}}
24+
{{- else if (partial "golangci/items/compare-versions" (dict "a" $gcilVersion "b" $item.since)) -}}
2525
{{- $tag.SetInMap "options" "tag" "New" -}}
2626
{{- $tag.SetInMap "options" "tagType" "warning" -}}
2727
{{- else if $item.canAutoFix -}}

docs/layouts/_shortcodes/golangci/filter-bar.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/layouts/_shortcodes/golangci/item-cards.html renamed to docs/layouts/_shortcodes/golangci/items/cards.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
@param {string} group The group to filter items by (use the prefix `!` to exclude items from the group).
77
@returns {string}
88

9-
@example {{< golangci/item-cards path="formatters" data="formatters_info" >}}
10-
@example {{< golangci/item-cards path="linters" data="linters_info" group="!standard" >}}
9+
@example {{< golangci/items/cards path="formatters" data="formatters_info" >}}
10+
@example {{< golangci/items/cards path="linters" data="linters_info" group="!standard" >}}
1111
*/ -}}
1212

1313
{{- $file := .Get "data" -}}
@@ -52,10 +52,10 @@
5252
{{- $s.SetInMap "options" "page" .Page -}}
5353
{{- $s.SetInMap "options" "link" (print "/docs/" $path "/configuration/#" .name) -}}
5454
{{- $s.SetInMap "options" "title" .name -}}
55-
{{- $s.SetInMap "options" "subtitle" (partial "golangci/format-description" .desc) -}}
55+
{{- $s.SetInMap "options" "subtitle" (partial "golangci/items/format-description" .desc) -}}
5656

5757
{{- /* Create tag information */ -}}
58-
{{- $tagOptions := partial "golangci/item-tag.html" (dict "gcilVersion" $gcilVersion "item" .) -}}
58+
{{- $tagOptions := partial "golangci/items/tag" (dict "gcilVersion" $gcilVersion "item" .) -}}
5959
{{- range $k, $v := $tagOptions -}}
6060
{{- $s.SetInMap "options" $k $v -}}
6161
{{- end -}}
@@ -76,7 +76,7 @@
7676
{{- if in .groups "standard" -}}
7777
{{- $class = $class | append "gl-default" -}}
7878
{{- end -}}
79-
{{- if (partial "golangci/compare-versions.html" (dict "a" $gcilVersion "b" .since)) -}}
79+
{{- if (partial "golangci/items/compare-versions" (dict "a" $gcilVersion "b" .since)) -}}
8080
{{- $class = $class | append "gl-new" -}}
8181
{{- end -}}
8282

0 commit comments

Comments
 (0)