Skip to content

Commit 068a2b5

Browse files
authored
dev: use namespaced partials and shortcodes (#6028)
1 parent 4f891ec commit 068a2b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+199
-179
lines changed

docs/content/docs/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Golangci-lint is a free and open-source project built by volunteers.
3232

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

35-
{{< button text="Donate ❤️" link="/docs/donate" >}}
35+
{{< golangci/button text="Donate ❤️" link="/docs/donate" >}}
3636

3737
## Contributors
3838

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

4343
## Stargazers over time
4444

45-
{{< starcharts repo="golangci/golangci-lint" >}}
45+
{{< golangci/starcharts repo="golangci/golangci-lint" >}}

docs/content/docs/configuration/cli.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Command-Line
33
weight: 1
44
---
55

6-
{{% cli-output %}}
6+
{{% golangci/cli-output %}}
77

88
## `run`
99

@@ -24,7 +24,7 @@ weight: 1
2424
>
2525
> The formatters can be enabled/disabled by defining them inside the [`formatters`](/docs/configuration/file/#formatters-configuration) section or by using the flags `-E/--enable`, `-D/--disable` of command [`golangci-lint fmt`](/docs/configuration/cli/#fmt).
2626
27-
{{% cli-output cmd="run" %}}
27+
{{% golangci/cli-output cmd="run" %}}
2828

2929
When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified,
3030
golangci-lint writes runtime profiling data in the format expected by the [pprof](https://github.com/google/pprof) visualization tool.
@@ -40,23 +40,23 @@ the `go tool trace` command and visualization tool.
4040
{{< card link="/docs/formatters/configuration/" title="Formatter Settings" icon="adjustments" >}}
4141
{{< /cards >}}
4242

43-
{{% cli-output cmd="fmt" %}}
43+
{{% golangci/cli-output cmd="fmt" %}}
4444

4545
## `migrate`
4646

47-
{{% cli-output cmd="migrate" %}}
47+
{{% golangci/cli-output cmd="migrate" %}}
4848

4949
## `formatters`
5050

51-
{{% cli-output cmd="formatters" %}}
51+
{{% golangci/cli-output cmd="formatters" %}}
5252

5353
## `help`
5454

55-
{{% cli-output cmd="help" %}}
55+
{{% golangci/cli-output cmd="help" %}}
5656

5757
## `linters`
5858

59-
{{% cli-output cmd="linters" %}}
59+
{{% golangci/cli-output cmd="linters" %}}
6060

6161
## `cache`
6262

@@ -66,20 +66,20 @@ You can override the default cache directory with the environment variable `GOLA
6666

6767
The cache is only used by `golangci-lint run` (linters).
6868

69-
{{% cli-output cmd="cache" %}}
69+
{{% golangci/cli-output cmd="cache" %}}
7070

7171
## `config`
7272

73-
{{% cli-output cmd="config" %}}
73+
{{% golangci/cli-output cmd="config" %}}
7474

7575
## `custom`
7676

77-
{{% cli-output cmd="custom" %}}
77+
{{% golangci/cli-output cmd="custom" %}}
7878

7979
## `version`
8080

81-
{{% cli-output cmd="version" %}}
81+
{{% golangci/cli-output cmd="version" %}}
8282

8383
## `completion`
8484

85-
{{% cli-output cmd="completion" %}}
85+
{{% golangci/cli-output cmd="completion" %}}

docs/content/docs/configuration/file.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ it's just a reference to display all the configuration options used to generate
2323

2424
The configuration file can be validated with the JSON Schema: [golangci.jsonschema.json](https://golangci-lint.run/jsonschema/golangci.jsonschema.json)
2525

26-
{{% configuration-file-snippet section="root" %}}
26+
{{% golangci/configuration-file-snippet section="root" %}}
2727

2828
## `version` configuration
2929

30-
{{% configuration-file-snippet section="version" %}}
30+
{{% golangci/configuration-file-snippet section="version" %}}
3131

3232
## `linters` configuration
3333

@@ -36,7 +36,7 @@ The configuration file can be validated with the JSON Schema: [golangci.jsonsche
3636
{{< card link="/docs/linters/configuration" title="Linters Settings" icon="adjustments" >}}
3737
{{< /cards >}}
3838

39-
{{% configuration-file-snippet section="linters" %}}
39+
{{% golangci/configuration-file-snippet section="linters" %}}
4040

4141
## `formatters` configuration
4242

@@ -45,20 +45,20 @@ The configuration file can be validated with the JSON Schema: [golangci.jsonsche
4545
{{< card link="/docs/formatters/configuration" title="Formatters Settings" icon="adjustments" >}}
4646
{{< /cards >}}
4747

48-
{{% configuration-file-snippet section="formatters" %}}
48+
{{% golangci/configuration-file-snippet section="formatters" %}}
4949

5050
## `issues` configuration
5151

52-
{{% configuration-file-snippet section="issues" %}}
52+
{{% golangci/configuration-file-snippet section="issues" %}}
5353

5454
## `output` configuration
5555

56-
{{% configuration-file-snippet section="output" %}}
56+
{{% golangci/configuration-file-snippet section="output" %}}
5757

5858
## `run` configuration
5959

60-
{{% configuration-file-snippet section="run" %}}
60+
{{% golangci/configuration-file-snippet section="run" %}}
6161

6262
## `severity` configuration
6363

64-
{{% configuration-file-snippet section="severity" %}}
64+
{{% golangci/configuration-file-snippet section="severity" %}}

docs/content/docs/contributing/website.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The site is based on [hextra](https://github.com/imfing/hextra) theme.
2121

2222
We use [shortcodes](https://gohugo.io/templates/types/#shortcode) and [partials](https://gohugo.io/templates/types/#partial) based on files from `./docs/.tmp/` and `./docs/data/`.
2323

24-
- The files in `./docs/.tmp/` are used to be embedded with the shortcode `{{%/* embed file="filename.ext" */%}}`.
24+
- The files in `./docs/.tmp/` are used to be embedded with the shortcode `{{%/* golangci/embed file="filename.ext" */%}}`.
2525
- The files in `./docs/data/` are used as [data sources](https://gohugo.io/content-management/data-sources/).
2626

2727
These files are created by running:

docs/content/docs/donate/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ If you value it, consider supporting us, we appreciate it! ❤️
1111

1212
You can support us via:
1313

14-
{{< custom-cards mainClass="support-cards" cols=7 >}}
14+
{{< cards class="support-cards" cols=7 >}}
1515
{{< card link="https://github.com/sponsors/golangci" title="GitHub Sponsors" subtitle="Credit card" image="/images/github-sponsors.svg" >}}
1616
{{< card link="https://opencollective.com/golangci-lint" title="Open Collective" subtitle="Credit card, PayPal, etc." image="/images/open-collective.svg" >}}
1717
{{< card link="https://thanks.dev/u/gh/golangci" title="Thanks.dev" subtitle="Credit card" image="/images/thanks-dev.svg" >}}
18-
{{< /custom-cards >}}
18+
{{< /cards >}}

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

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

4040
{{< cards >}}
41-
{{< 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-
{{% item-settings info="linters_info" settings="linter_settings" %}}
6+
{{% golangci/items/settings info="linters_info" settings="linter_settings" %}}

docs/content/docs/linters/false-positives.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,6 @@ Use `//nolint` instead of `// nolint` because directives should have no space by
168168
Some exclusions are considered common.
169169
To help golangci-lint users, those common exclusions are provided through presets.
170170

171-
{{% exclusion-presets-snippet %}}
171+
{{% golangci/exclusion-presets-snippet %}}
172172

173-
{{% exclusion-preset-tables %}}
173+
{{% golangci/exclusion-preset-tables %}}

0 commit comments

Comments
 (0)