diff --git a/docs/content/docs/_index.md b/docs/content/docs/_index.md index 479897a51dab..988ecce901b4 100644 --- a/docs/content/docs/_index.md +++ b/docs/content/docs/_index.md @@ -32,7 +32,7 @@ Golangci-lint is a free and open-source project built by volunteers. If you value it, consider supporting us, we appreciate it! -{{< button text="Donate ❤️" link="/docs/donate" >}} +{{< golangci/button text="Donate ❤️" link="/docs/donate" >}} ## Contributors @@ -42,4 +42,4 @@ This project exists thanks to all the people who contribute. [How to contribute] ## Stargazers over time -{{< starcharts repo="golangci/golangci-lint" >}} +{{< golangci/starcharts repo="golangci/golangci-lint" >}} diff --git a/docs/content/docs/configuration/cli.md b/docs/content/docs/configuration/cli.md index 84547c3e512e..5f2974771fe5 100644 --- a/docs/content/docs/configuration/cli.md +++ b/docs/content/docs/configuration/cli.md @@ -3,7 +3,7 @@ title: Command-Line weight: 1 --- -{{% cli-output %}} +{{% golangci/cli-output %}} ## `run` @@ -24,7 +24,7 @@ weight: 1 > > 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). -{{% cli-output cmd="run" %}} +{{% golangci/cli-output cmd="run" %}} When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified, 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. {{< card link="/docs/formatters/configuration/" title="Formatter Settings" icon="adjustments" >}} {{< /cards >}} -{{% cli-output cmd="fmt" %}} +{{% golangci/cli-output cmd="fmt" %}} ## `migrate` -{{% cli-output cmd="migrate" %}} +{{% golangci/cli-output cmd="migrate" %}} ## `formatters` -{{% cli-output cmd="formatters" %}} +{{% golangci/cli-output cmd="formatters" %}} ## `help` -{{% cli-output cmd="help" %}} +{{% golangci/cli-output cmd="help" %}} ## `linters` -{{% cli-output cmd="linters" %}} +{{% golangci/cli-output cmd="linters" %}} ## `cache` @@ -66,20 +66,20 @@ You can override the default cache directory with the environment variable `GOLA The cache is only used by `golangci-lint run` (linters). -{{% cli-output cmd="cache" %}} +{{% golangci/cli-output cmd="cache" %}} ## `config` -{{% cli-output cmd="config" %}} +{{% golangci/cli-output cmd="config" %}} ## `custom` -{{% cli-output cmd="custom" %}} +{{% golangci/cli-output cmd="custom" %}} ## `version` -{{% cli-output cmd="version" %}} +{{% golangci/cli-output cmd="version" %}} ## `completion` -{{% cli-output cmd="completion" %}} +{{% golangci/cli-output cmd="completion" %}} diff --git a/docs/content/docs/configuration/file.md b/docs/content/docs/configuration/file.md index 2fe13752be1e..aaf233558921 100644 --- a/docs/content/docs/configuration/file.md +++ b/docs/content/docs/configuration/file.md @@ -23,11 +23,11 @@ it's just a reference to display all the configuration options used to generate The configuration file can be validated with the JSON Schema: [golangci.jsonschema.json](https://golangci-lint.run/jsonschema/golangci.jsonschema.json) -{{% configuration-file-snippet section="root" %}} +{{% golangci/configuration-file-snippet section="root" %}} ## `version` configuration -{{% configuration-file-snippet section="version" %}} +{{% golangci/configuration-file-snippet section="version" %}} ## `linters` configuration @@ -36,7 +36,7 @@ The configuration file can be validated with the JSON Schema: [golangci.jsonsche {{< card link="/docs/linters/configuration" title="Linters Settings" icon="adjustments" >}} {{< /cards >}} -{{% configuration-file-snippet section="linters" %}} +{{% golangci/configuration-file-snippet section="linters" %}} ## `formatters` configuration @@ -45,20 +45,20 @@ The configuration file can be validated with the JSON Schema: [golangci.jsonsche {{< card link="/docs/formatters/configuration" title="Formatters Settings" icon="adjustments" >}} {{< /cards >}} -{{% configuration-file-snippet section="formatters" %}} +{{% golangci/configuration-file-snippet section="formatters" %}} ## `issues` configuration -{{% configuration-file-snippet section="issues" %}} +{{% golangci/configuration-file-snippet section="issues" %}} ## `output` configuration -{{% configuration-file-snippet section="output" %}} +{{% golangci/configuration-file-snippet section="output" %}} ## `run` configuration -{{% configuration-file-snippet section="run" %}} +{{% golangci/configuration-file-snippet section="run" %}} ## `severity` configuration -{{% configuration-file-snippet section="severity" %}} +{{% golangci/configuration-file-snippet section="severity" %}} diff --git a/docs/content/docs/contributing/website.md b/docs/content/docs/contributing/website.md index 734a0ef36767..36e86ffd7821 100644 --- a/docs/content/docs/contributing/website.md +++ b/docs/content/docs/contributing/website.md @@ -21,7 +21,7 @@ The site is based on [hextra](https://github.com/imfing/hextra) theme. 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/`. -- The files in `./docs/.tmp/` are used to be embedded with the shortcode `{{%/* embed file="filename.ext" */%}}`. +- The files in `./docs/.tmp/` are used to be embedded with the shortcode `{{%/* golangci/embed file="filename.ext" */%}}`. - The files in `./docs/data/` are used as [data sources](https://gohugo.io/content-management/data-sources/). These files are created by running: diff --git a/docs/content/docs/donate/_index.md b/docs/content/docs/donate/_index.md index 68c43b8b065a..07f84a5c0422 100644 --- a/docs/content/docs/donate/_index.md +++ b/docs/content/docs/donate/_index.md @@ -11,8 +11,8 @@ If you value it, consider supporting us, we appreciate it! ❤️ You can support us via: -{{< custom-cards mainClass="support-cards" cols=7 >}} +{{< cards class="support-cards" cols=7 >}} {{< card link="https://github.com/sponsors/golangci" title="GitHub Sponsors" subtitle="Credit card" image="/images/github-sponsors.svg" >}} {{< card link="https://opencollective.com/golangci-lint" title="Open Collective" subtitle="Credit card, PayPal, etc." image="/images/open-collective.svg" >}} {{< card link="https://thanks.dev/u/gh/golangci" title="Thanks.dev" subtitle="Credit card" image="/images/thanks-dev.svg" >}} -{{< /custom-cards >}} +{{< /cards >}} diff --git a/docs/content/docs/formatters/_index.md b/docs/content/docs/formatters/_index.md index 097c5c8936ca..8ceef54fa35e 100644 --- a/docs/content/docs/formatters/_index.md +++ b/docs/content/docs/formatters/_index.md @@ -27,12 +27,12 @@ golangci-lint formatters ## All formatters -{{< filter-bar >}} - {{< clickable-badge class="gl-filter" id="new-filter" icon="fire" content="New" type="warning" >}} - {{< clickable-badge class="gl-filter" id="deprecated-filter" icon="emoji-sad" content="Deprecated" type="info" >}} - {{< clickable-badge class="gl-filter-reset gl-hidden" id="reset-filter" icon="trash" content="Reset" type="error" border=true >}} -{{< /filter-bar >}} +{{< 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 >}} {{< cards >}} - {{< item-cards path="formatters" data="formatters_info" >}} + {{< golangci/items/cards path="formatters" data="formatters_info" >}} {{< /cards >}} diff --git a/docs/content/docs/formatters/configuration.md b/docs/content/docs/formatters/configuration.md index e8f17c124e79..5f89c095791b 100644 --- a/docs/content/docs/formatters/configuration.md +++ b/docs/content/docs/formatters/configuration.md @@ -3,4 +3,4 @@ title: Settings weight: 2 --- -{{% item-settings info="formatters_info" settings="formatter_settings" %}} +{{% golangci/items/settings info="formatters_info" settings="formatter_settings" %}} diff --git a/docs/content/docs/linters/_index.md b/docs/content/docs/linters/_index.md index 6d5b456aa19c..951408b20bf3 100644 --- a/docs/content/docs/linters/_index.md +++ b/docs/content/docs/linters/_index.md @@ -27,16 +27,16 @@ golangci-lint linters ## All Linters -{{< filter-bar >}} - {{< clickable-badge class="gl-filter" id="default-filter" icon="inbox" content="Default" type="info" >}} - {{< clickable-badge class="gl-filter" id="new-filter" icon="fire" content="New" type="warning" >}} - {{< clickable-badge class="gl-filter" id="autofix-filter" icon="sparkles" content="Autofix" type="info" >}} - {{< clickable-badge class="gl-filter" id="fast-filter" icon="fast-forward" content="Fast" >}} - {{< clickable-badge class="gl-filter" id="slow-filter" icon="play" content="Slow" >}} - {{< clickable-badge class="gl-filter" id="deprecated-filter" icon="emoji-sad" content="Deprecated" type="info" >}} - {{< clickable-badge class="gl-filter-reset gl-hidden" icon="trash" id="reset-filter" content="Reset" type="error" border=true >}} -{{< /filter-bar >}} +{{< 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="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 >}} {{< cards >}} - {{< item-cards path="linters" data="linters_info" >}} + {{< golangci/items/cards path="linters" data="linters_info" >}} {{< /cards >}} diff --git a/docs/content/docs/linters/configuration.md b/docs/content/docs/linters/configuration.md index fc11ffc31179..e0c76068fba6 100644 --- a/docs/content/docs/linters/configuration.md +++ b/docs/content/docs/linters/configuration.md @@ -3,4 +3,4 @@ title: Settings weight: 2 --- -{{% item-settings info="linters_info" settings="linter_settings" %}} +{{% golangci/items/settings info="linters_info" settings="linter_settings" %}} diff --git a/docs/content/docs/linters/false-positives.md b/docs/content/docs/linters/false-positives.md index 504cef0ae7a1..ff6643ee4f3e 100644 --- a/docs/content/docs/linters/false-positives.md +++ b/docs/content/docs/linters/false-positives.md @@ -168,6 +168,6 @@ Use `//nolint` instead of `// nolint` because directives should have no space by Some exclusions are considered common. To help golangci-lint users, those common exclusions are provided through presets. -{{% exclusion-presets-snippet %}} +{{% golangci/exclusion-presets-snippet %}} -{{% exclusion-preset-tables %}} +{{% golangci/exclusion-preset-tables %}} diff --git a/docs/content/docs/plugins/_index.md b/docs/content/docs/plugins/_index.md index 7910f8ba375e..401ab525228a 100644 --- a/docs/content/docs/plugins/_index.md +++ b/docs/content/docs/plugins/_index.md @@ -4,6 +4,6 @@ weight: 7 --- {{< cards >}} - {{< card link="/docs/plugins/module-plugins/" title="Module Plugin System" icon="puzzle" tag="Recommended" >}} + {{< card link="/docs/plugins/module-plugins/" title="Module Plugin System" icon="puzzle" tag="Recommended" tagType="icon-only:sparkles" >}} {{< card link="/docs/plugins/go-plugins/" title="Go Plugin System" icon="puzzle" >}} {{< /cards >}} diff --git a/docs/content/docs/plugins/module-plugins.md b/docs/content/docs/plugins/module-plugins.md index ca107cfe8bda..e5126fbf2f1f 100644 --- a/docs/content/docs/plugins/module-plugins.md +++ b/docs/content/docs/plugins/module-plugins.md @@ -22,7 +22,7 @@ Requirements: ### Configuration Example ```yaml {filename=".custom-gcl.yml"} -version: {{< latest-version >}} +version: {{< golangci/latest-version >}} plugins: # a plugin from a Go proxy - module: 'github.com/golangci/plugin1' @@ -81,5 +81,5 @@ linters: The configuration file can be validated with the JSON Schema: [custom-gcl.jsonschema.json](https://golangci-lint.run/jsonschema/custom-gcl.jsonschema.json) ```yml {filename=".custom-gcl.yml"} -{{% embed file=".tmp/.custom-gcl.reference.yml" %}} +{{% golangci/embed file=".tmp/.custom-gcl.reference.yml" %}} ``` diff --git a/docs/content/docs/product/changelog.md b/docs/content/docs/product/changelog.md index ee1163450a7b..1bb9b5c6f145 100644 --- a/docs/content/docs/product/changelog.md +++ b/docs/content/docs/product/changelog.md @@ -12,6 +12,6 @@ Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint) If you value it, consider supporting us, we appreciate it! -{{< button text="Donate ❤️" link="/docs/donate" >}} +{{< golangci/button text="Donate ❤️" link="/docs/donate" >}} -{{% embed file=".tmp/raw_changelog.tmp" %}} +{{% golangci/embed file=".tmp/raw_changelog.tmp" %}} diff --git a/docs/content/docs/product/migration-guide.md b/docs/content/docs/product/migration-guide.md index 9c18c0c69785..c4785ff003b7 100644 --- a/docs/content/docs/product/migration-guide.md +++ b/docs/content/docs/product/migration-guide.md @@ -48,7 +48,7 @@ Other fields explicitly defined in the configuration file are migrated even if t The `migrate` command automatically migrates `linters.presets` in individual linters to `linters.enable`. -{{% cli-output cmd="migrate" %}} +{{% golangci/cli-output cmd="migrate" %}} ## Changes diff --git a/docs/content/docs/product/thanks.md b/docs/content/docs/product/thanks.md index 3f4ae9e563f0..64884da41f85 100644 --- a/docs/content/docs/product/thanks.md +++ b/docs/content/docs/product/thanks.md @@ -9,9 +9,9 @@ aliases: ### Thanks to developers and authors of used linters -{{< custom-cards mainClass="author-cards" cols=7 >}} -{{< authors >}} -{{< /custom-cards >}} +{{< cards class="author-cards" cols=7 >}} +{{< golangci/authors >}} +{{< /cards >}} ### Thanks to all contributors diff --git a/docs/content/docs/welcome/install.md b/docs/content/docs/welcome/install.md index fb394733f160..882a6e7e9f19 100644 --- a/docs/content/docs/welcome/install.md +++ b/docs/content/docs/welcome/install.md @@ -26,8 +26,8 @@ and it can be much faster than the simple binary installation. Also, the action creates GitHub annotations for found issues (you don't need to dig into build log to see found by golangci-lint issues). {{< cards cols=2 >}} - {{< image-card src="/images/colored-line-number.png" title="Console Output" >}} - {{< image-card src="/images/annotations.png" title="Annotations" >}} + {{< golangci/image-card src="/images/colored-line-number.png" title="Console Output" >}} + {{< golangci/image-card src="/images/annotations.png" title="Annotations" >}} {{< /cards >}} ### GitLab CI @@ -48,13 +48,13 @@ Here is the other way to install golangci-lint: ```bash # binary will be $(go env GOPATH)/bin/golangci-lint -curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin {{< latest-version >}} +curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin {{< golangci/latest-version >}} # or install it into ./bin/ -curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< latest-version >}} +curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< golangci/latest-version >}} # In Alpine Linux (as it does not come with curl by default) -wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< latest-version >}} +wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< golangci/latest-version >}} golangci-lint --version ``` @@ -70,7 +70,7 @@ For any problems with golangci-lint, check out recent [GitHub issues](https://gi ```bash # binary will be $(go env GOPATH)/bin/golangci-lint -curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin {{< latest-version >}} +curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin {{< golangci/latest-version >}} golangci-lint --version ``` @@ -138,12 +138,12 @@ The scoop package is not officially maintained by golangci team. ### Docker ```bash -docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:{{< latest-version >}} golangci-lint run +docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:{{< golangci/latest-version >}} golangci-lint run ``` Colored output: ```bash -docker run -t --rm -v $(pwd):/app -w /app golangci/golangci-lint:{{< latest-version >}} golangci-lint run +docker run -t --rm -v $(pwd):/app -w /app golangci/golangci-lint:{{< golangci/latest-version >}} golangci-lint run ``` Preserving caches between consecutive runs: @@ -153,7 +153,7 @@ docker run --rm -t -v $(pwd):/app -w /app \ -v $(go env GOCACHE):/.cache/go-build -e GOCACHE=/.cache/go-build \ -v $(go env GOMODCACHE):/.cache/mod -e GOMODCACHE=/.cache/mod \ -v ~/.cache/golangci-lint:/.cache/golangci-lint -e GOLANGCI_LINT_CACHE=/.cache/golangci-lint \ -golangci/golangci-lint:{{< latest-version >}} golangci-lint run +golangci/golangci-lint:{{< golangci/latest-version >}} golangci-lint run ``` ### Install from Sources @@ -173,7 +173,7 @@ These installations aren't recommended because of the following points: 7. It's slower than binary installation. ```bash -go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{{< latest-version >}} +go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{{< golangci/latest-version >}} ``` {{% details title="`go tool` usage recommendations" closed="true" %}} @@ -199,7 +199,7 @@ go mod init -modfile=golangci-lint.mod /golangci-lint ```sh # Add golangci-lint as a tool -go get -tool -modfile=golangci-lint.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{{< latest-version >}} +go get -tool -modfile=golangci-lint.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{{< golangci/latest-version >}} ``` ```sh diff --git a/docs/content/docs/welcome/quick-start.md b/docs/content/docs/welcome/quick-start.md index 7ccab985c428..145ae81c8dd9 100644 --- a/docs/content/docs/welcome/quick-start.md +++ b/docs/content/docs/welcome/quick-start.md @@ -32,7 +32,7 @@ It's not possible to mix files and packages/directories, and files must come fro Golangci-lint can be used with zero configuration. By default, the following linters are enabled: -{{% cli-output section="defaultEnabledLinters" cmd="help linters" %}} +{{% golangci/cli-output section="defaultEnabledLinters" cmd="help linters" %}} Pass `-E/--enable` to enable linter and `-D/--disable` to disable: diff --git a/docs/layouts/_partials/clickable-badge.html b/docs/layouts/_partials/clickable-badge.html deleted file mode 100644 index a7ee3be3475e..000000000000 --- a/docs/layouts/_partials/clickable-badge.html +++ /dev/null @@ -1,36 +0,0 @@ -{{- /* 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. - -@param {string} content The content of the badge. -@param {string} type The type of the badge. -@param {string} id The id of the badge. -@param {string} class The class of the badge. -@param {boolean} border Whether to render a border around the badge. -@param {string} icon The icon of the badge. - -*/ -}} - -{{- $content := .content -}} -{{- $type := .type -}} -{{- $id := .id | default "" -}} -{{- $class := .class | default "" -}} -{{- $border := .border | default false -}} -{{- $icon := .icon | 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" -}} - -{{- $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" -}} - -{{- $borderClass := cond (eq $border true) "hx:border" "" -}} -{{- $badgeClass := or ($styleClass.Get $type) $defaultClass -}} -
-
- {{- with $icon -}}{{- partial "utils/icon" (dict "name" . "attributes" "height=12") -}}{{- end -}} - {{- $content -}} -
-
-{{- /* Strip trailing newline. */ -}} diff --git a/docs/layouts/_partials/custom-cards.html b/docs/layouts/_partials/custom-cards.html deleted file mode 100644 index 70c95597d5b7..000000000000 --- a/docs/layouts/_partials/custom-cards.html +++ /dev/null @@ -1,8 +0,0 @@ -{{/* 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" -}} - -
- {{- $content -}} -
diff --git a/docs/layouts/_partials/custom/head-end.html b/docs/layouts/_partials/custom/head-end.html index bd4bc3514936..37c3f12d0199 100644 --- a/docs/layouts/_partials/custom/head-end.html +++ b/docs/layouts/_partials/custom/head-end.html @@ -20,7 +20,7 @@ let clean = event.currentTarget.classList.contains(borderClass) document.querySelectorAll('.gl-item').forEach(element => element.classList.remove(hiddenClass)); - document.querySelectorAll('.gl-filter').forEach(element => element.classList.remove(borderClass)); + document.querySelectorAll('.gl-filter > *').forEach(element => element.classList.remove(borderClass)); if (clean) { resetButton.classList.add(hiddenClass); @@ -29,26 +29,26 @@ document.querySelectorAll('.gl-filter').forEach(element => element.classList.remove(borderClass)) - event.currentTarget.classList.add(borderClass); + event.currentTarget.querySelector('*').classList.add(borderClass); let selector = '' - switch (event.currentTarget.id) { - case 'default-filter': + switch (event.currentTarget.dataset.badge) { + case 'default': selector = '.gl-item:not(.gl-default)' break; - case 'new-filter': + case 'new': selector = '.gl-item:not(.gl-new)' break; - case 'autofix-filter': + case 'autofix': selector = '.gl-item:not(.gl-autofix)' break; - case 'fast-filter': + case 'fast': selector = '.gl-item:not(.gl-slow)' break; - case 'slow-filter': + case 'slow': selector = '.gl-item:not(.gl-fast)' break; - case 'deprecated-filter': + case 'deprecated': selector = '.gl-item:not(.gl-deprecated)' break; } @@ -64,7 +64,7 @@ event.currentTarget.classList.add(hiddenClass); document.querySelectorAll('.gl-item').forEach(element => element.classList.remove(hiddenClass)); - document.querySelectorAll('.gl-filter').forEach(element => element.classList.remove(borderClass)); + document.querySelectorAll('.gl-filter > *').forEach(element => element.classList.remove(borderClass)); }); }); diff --git a/docs/layouts/_partials/footer.html b/docs/layouts/_partials/footer.html index 1d5c4a4e97bb..ee4c33716d61 100644 --- a/docs/layouts/_partials/footer.html +++ b/docs/layouts/_partials/footer.html @@ -1,4 +1,6 @@ {{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_partials/footer.html */ -}} +{{- /* This file overrides the footer partial of the theme */ -}} + {{- $enableFooterSwitches := .Scratch.Get "enableFooterSwitches" | default false -}} {{- $displayThemeToggle := site.Params.theme.displayToggle | default true -}} {{- $footerSwitchesVisible := and $enableFooterSwitches (or hugo.IsMultilingual $displayThemeToggle) -}} diff --git a/docs/layouts/_partials/compare-versions.html b/docs/layouts/_partials/golangci/items/compare-versions.html similarity index 74% rename from docs/layouts/_partials/compare-versions.html rename to docs/layouts/_partials/golangci/items/compare-versions.html index 45cad4ce14d5..337c7353c4d2 100644 --- a/docs/layouts/_partials/compare-versions.html +++ b/docs/layouts/_partials/golangci/items/compare-versions.html @@ -5,7 +5,7 @@ @param {string} b Version B @returns {boolean} -@example {{ partial "compare-versions.html" (dict "a" "v1.2.3" "b" "v1.2.4") }} +@example {{ partial "golangci/items/compare-versions" (dict "a" "v1.2.3" "b" "v1.2.4") }} */ -}} {{- $aVersion := path.Dir (replace .a "." "/") -}} diff --git a/docs/layouts/_partials/format-description.html b/docs/layouts/_partials/golangci/items/format-description.html similarity index 81% rename from docs/layouts/_partials/format-description.html rename to docs/layouts/_partials/golangci/items/format-description.html index 8a661a0003d0..2de7b1e9222f 100644 --- a/docs/layouts/_partials/format-description.html +++ b/docs/layouts/_partials/golangci/items/format-description.html @@ -4,7 +4,7 @@ @param {string} (positional parameter 0) Description @returns {string} -@example {{ partial "format-description" "message" }} +@example {{ partial "golangci/items/format-description" "message" }} */ -}} {{- $desc := . -}} diff --git a/docs/layouts/_partials/item-tag.html b/docs/layouts/_partials/golangci/items/tag.html similarity index 84% rename from docs/layouts/_partials/item-tag.html rename to docs/layouts/_partials/golangci/items/tag.html index 93dc2ee40b21..6104dd79dbcc 100644 --- a/docs/layouts/_partials/item-tag.html +++ b/docs/layouts/_partials/golangci/items/tag.html @@ -4,7 +4,7 @@ @param {string} (positional parameter 0) Description @returns {map[tag: string, tagType: string]} -@example {{ partial "item-tag.html" (dict "gcilVersion" "v1.2.3" "item" .) }} +@example {{ partial "golangci/items/tag" (dict "gcilVersion" "v1.2.3" "item" .) }} */ -}} {{- $gcilVersion := .gcilVersion -}} @@ -21,7 +21,7 @@ {{- $tag.SetInMap "options" "subtitle" (print (strings.FirstUpper $item.deprecation.message) $replacement) -}} {{- $tag.SetInMap "options" "tag" (print "Deprecated since " $item.deprecation.since) -}} {{- $tag.SetInMap "options" "tagType" "error" -}} -{{- else if (partial "compare-versions.html" (dict "a" $gcilVersion "b" $item.since)) -}} +{{- else if (partial "golangci/items/compare-versions" (dict "a" $gcilVersion "b" $item.since)) -}} {{- $tag.SetInMap "options" "tag" "New" -}} {{- $tag.SetInMap "options" "tagType" "warning" -}} {{- else if $item.canAutoFix -}} diff --git a/docs/layouts/_partials/shortcodes/badge.html b/docs/layouts/_partials/shortcodes/badge.html new file mode 100644 index 000000000000..ef4ed96a979d --- /dev/null +++ b/docs/layouts/_partials/shortcodes/badge.html @@ -0,0 +1,45 @@ +{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_partials/shortcodes/badge.html */ -}} +{{- /* This file overrides the badge partial of the theme */ -}} + +{{- $content := .content -}} +{{- $type := .type | default "" -}} +{{- $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" -}} + +{{- $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" -}} + +{{- $borderClass := cond (eq $border true) "hx:border" "" -}} +{{- $badgeClass := or ($styleClass.Get $type) $defaultClass -}} + +{{- /* Custom section to handle icon-only badges. */ -}} +{{- $iconOnly := hasPrefix $type "icon-only" -}} +{{- if $iconOnly -}} + {{- $icon = (strings.TrimPrefix "icon-only:" $type) -}} + {{- $borderClass = "" -}} + {{- $defaultClass = "" -}} + {{- $badgeClass = "hx:p-2" -}} +{{- end -}} + +{{- /* Custom section to set attributes. */ -}} +{{- $attributes := slice -}} +{{- if $iconOnly -}} + {{- $attributes = $attributes | append (printf `title="%s"` $content) -}} +{{- end -}} +{{- if $data -}} + {{- $attributes = $attributes | append (printf `data-badge="%s"` $data) -}} +{{- end -}} + +
+
+ {{- with $icon -}}{{- partial "utils/icon" (dict "name" . "attributes" "height=12") -}}{{- end -}} + {{- if not $iconOnly -}}{{- $content -}}{{- end -}} +
+
+{{- /* Strip trailing newline. */ -}} diff --git a/docs/layouts/_partials/shortcodes/cards.html b/docs/layouts/_partials/shortcodes/cards.html new file mode 100644 index 000000000000..3acb5a815f0f --- /dev/null +++ b/docs/layouts/_partials/shortcodes/cards.html @@ -0,0 +1,10 @@ +{{/* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_partials/shortcodes/cards.html */}} +{{- /* This file overrides the details shortcode of the theme */ -}} + +{{- $cols := .cols | default 3 -}} +{{- $content := .content -}} +{{- $class := .class | default "hextra-cards" -}} + +
+ {{- $content -}} +
diff --git a/docs/layouts/_shortcodes/cards.html b/docs/layouts/_shortcodes/cards.html new file mode 100644 index 000000000000..1ddcbb130cd4 --- /dev/null +++ b/docs/layouts/_shortcodes/cards.html @@ -0,0 +1,16 @@ +{{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_shortcodes/cards.html */ -}} +{{- /* This file overrides the cards shortcode of the theme */ -}} + +{{- /* +A shortcode for creating cards. + +@param {string} cols The number of columns. +@param {string} class The class of the cards. + +@example {{< cards cols="3" >}}{{< /cards >}} +*/ -}} + +{{- $cols := .Get "cols" | default 3 -}} +{{- $class := .Get "class" | default "hextra-cards" -}} + +{{- partial "shortcodes/cards" (dict "cols" $cols "class" $class "content" .Inner) -}} diff --git a/docs/layouts/_shortcodes/custom-cards.html b/docs/layouts/_shortcodes/custom-cards.html deleted file mode 100644 index 051e4a9309ca..000000000000 --- a/docs/layouts/_shortcodes/custom-cards.html +++ /dev/null @@ -1,11 +0,0 @@ -{{- /* 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. - -@example {{< custom-cards cols=7 >}}{{< authors >}}{{< /custom-cards >}} -*/ -}} - -{{- $cols := .Get "cols" | default 3 -}} -{{- $mainClass := .Get "mainClass" | default "hextra-cards" -}} - -{{- partial "custom-cards" (dict "cols" $cols "mainClass" $mainClass "content" .Inner) -}} diff --git a/docs/layouts/_shortcodes/details.html b/docs/layouts/_shortcodes/details.html index 0b93fdc21318..7054bb8a5da7 100644 --- a/docs/layouts/_shortcodes/details.html +++ b/docs/layouts/_shortcodes/details.html @@ -1,4 +1,6 @@ {{- /* Modified version of https://github.com/imfing/hextra/blob/v0.10.0/layouts/_shortcodes/details.html */ -}} +{{- /* This file overrides the details shortcode of the theme */ -}} + {{- $title := .Get "title" | default "" -}} {{- $closed := eq (.Get "closed") "true" | default false -}} diff --git a/docs/layouts/_shortcodes/filter-bar.html b/docs/layouts/_shortcodes/filter-bar.html deleted file mode 100644 index 781bb85aecd1..000000000000 --- a/docs/layouts/_shortcodes/filter-bar.html +++ /dev/null @@ -1,12 +0,0 @@ -{{- /* -This shortcode is used to create a filter bar. - -@example {{< filter-bar >}}{{< clickable-badge content="Example">}}{{< filter-bar >}} -*/ -}} - -
- - {{- partial "utils/icon.html" (dict "name" "filter" "attributes" "height=1.2em") -}} - - {{ .Inner }} -
diff --git a/docs/layouts/_shortcodes/authors.html b/docs/layouts/_shortcodes/golangci/authors.html similarity index 92% rename from docs/layouts/_shortcodes/authors.html rename to docs/layouts/_shortcodes/golangci/authors.html index b907a279ab18..c9276d6604de 100644 --- a/docs/layouts/_shortcodes/authors.html +++ b/docs/layouts/_shortcodes/golangci/authors.html @@ -1,7 +1,7 @@ {{- /* Creates a card for each author of a linter/formatter. -@example {{< authors >}} +@example {{< golangci/authors >}} */ -}} {{- $thanks := index $.Site.Data.thanks -}} diff --git a/docs/layouts/_shortcodes/button.html b/docs/layouts/_shortcodes/golangci/button.html similarity index 100% rename from docs/layouts/_shortcodes/button.html rename to docs/layouts/_shortcodes/golangci/button.html diff --git a/docs/layouts/_shortcodes/cli-output.html b/docs/layouts/_shortcodes/golangci/cli-output.html similarity index 77% rename from docs/layouts/_shortcodes/cli-output.html rename to docs/layouts/_shortcodes/golangci/cli-output.html index 33515b267588..2cb9743e1083 100644 --- a/docs/layouts/_shortcodes/cli-output.html +++ b/docs/layouts/_shortcodes/golangci/cli-output.html @@ -4,9 +4,9 @@ @param {string} cmd The name of the command. @param {string} section The name of the section inside the data file. -@example {{% cli-output %}} -@example {{% cli-output cmd="foo" %}} -@example {{% cli-output section="sectionName" cmd="foo bar" %}} +@example {{% golangci/cli-output %}} +@example {{% golangci/cli-output cmd="foo" %}} +@example {{% golangci/cli-output section="sectionName" cmd="foo bar" %}} */ -}} {{- $cmdName := .Get "cmd" -}} diff --git a/docs/layouts/_shortcodes/configuration-file-snippet.html b/docs/layouts/_shortcodes/golangci/configuration-file-snippet.html similarity index 81% rename from docs/layouts/_shortcodes/configuration-file-snippet.html rename to docs/layouts/_shortcodes/golangci/configuration-file-snippet.html index f70c521a9939..ce147cb75a55 100644 --- a/docs/layouts/_shortcodes/configuration-file-snippet.html +++ b/docs/layouts/_shortcodes/golangci/configuration-file-snippet.html @@ -4,7 +4,7 @@ @param {string} section The name of the section inside the data file. @returns {string} -@example {{% configuration-file-snippet section="sectionName" %}} +@example {{% golangci/configuration-file-snippet section="sectionName" %}} */ -}} {{- $sectionName := .Get "section" -}} diff --git a/docs/layouts/_shortcodes/embed.html b/docs/layouts/_shortcodes/golangci/embed.html similarity index 73% rename from docs/layouts/_shortcodes/embed.html rename to docs/layouts/_shortcodes/golangci/embed.html index 70e3c5efa4c6..4802e62efda3 100644 --- a/docs/layouts/_shortcodes/embed.html +++ b/docs/layouts/_shortcodes/golangci/embed.html @@ -4,7 +4,7 @@ @param {string} file The path to the file. @returns {string} -@example {{% embed file="path/to/file.txt" %}} +@example {{% golangci/embed file="path/to/file.txt" %}} */ -}} {{- $file := .Get "file" -}} diff --git a/docs/layouts/_shortcodes/exclusion-preset-tables.html b/docs/layouts/_shortcodes/golangci/exclusion-preset-tables.html similarity index 91% rename from docs/layouts/_shortcodes/exclusion-preset-tables.html rename to docs/layouts/_shortcodes/golangci/exclusion-preset-tables.html index 9cd5029defec..9c3ad021c882 100644 --- a/docs/layouts/_shortcodes/exclusion-preset-tables.html +++ b/docs/layouts/_shortcodes/golangci/exclusion-preset-tables.html @@ -1,7 +1,7 @@ {{- /* Creates a table of exclusion presets. -@example {{% exclusion-presets %}} +@example {{% golangci/exclusion-preset-tables %}} */ -}} {{- $presets := index $.Site.Data.exclusion_presets -}} diff --git a/docs/layouts/_shortcodes/exclusion-presets-snippet.html b/docs/layouts/_shortcodes/golangci/exclusion-presets-snippet.html similarity index 82% rename from docs/layouts/_shortcodes/exclusion-presets-snippet.html rename to docs/layouts/_shortcodes/golangci/exclusion-presets-snippet.html index 959f37604eb2..b1cea4e6d611 100644 --- a/docs/layouts/_shortcodes/exclusion-presets-snippet.html +++ b/docs/layouts/_shortcodes/golangci/exclusion-presets-snippet.html @@ -1,7 +1,7 @@ {{- /* Creates an exclusion presets configuration snippet. -@example {{% exclusion-presets %}} +@example {{% golangci/exclusion-presets-snippet %}} */ -}} {{- $presets := index $.Site.Data.exclusion_presets -}} diff --git a/docs/layouts/_shortcodes/image-card.html b/docs/layouts/_shortcodes/golangci/image-card.html similarity index 81% rename from docs/layouts/_shortcodes/image-card.html rename to docs/layouts/_shortcodes/golangci/image-card.html index de2fd48fea1d..8c25eadd17a4 100644 --- a/docs/layouts/_shortcodes/image-card.html +++ b/docs/layouts/_shortcodes/golangci/image-card.html @@ -4,7 +4,7 @@ @param {string} src The path to the image. @param {string} title The title text for the image. -@example {{< image-card src="path/to/image.png" title="Image description" >}} +@example {{< golangci/image-card src="path/to/image.png" title="Image description" >}} */ -}} {{- $src := .Get "src" -}} diff --git a/docs/layouts/_shortcodes/item-cards.html b/docs/layouts/_shortcodes/golangci/items/cards.html similarity index 83% rename from docs/layouts/_shortcodes/item-cards.html rename to docs/layouts/_shortcodes/golangci/items/cards.html index 9d34c3002b7f..8323ab383d2e 100644 --- a/docs/layouts/_shortcodes/item-cards.html +++ b/docs/layouts/_shortcodes/golangci/items/cards.html @@ -6,8 +6,8 @@ @param {string} group The group to filter items by (use the prefix `!` to exclude items from the group). @returns {string} -@example {{< item-cards path="formatters" data="formatters_info" >}} -@example {{< item-cards path="linters" data="linters_info" group="!standard" >}} +@example {{< golangci/items/cards path="formatters" data="formatters_info" >}} +@example {{< golangci/items/cards path="linters" data="linters_info" group="!standard" >}} */ -}} {{- $file := .Get "data" -}} @@ -52,10 +52,10 @@ {{- $s.SetInMap "options" "page" .Page -}} {{- $s.SetInMap "options" "link" (print "/docs/" $path "/configuration/#" .name) -}} {{- $s.SetInMap "options" "title" .name -}} - {{- $s.SetInMap "options" "subtitle" (partial "format-description" .desc) -}} + {{- $s.SetInMap "options" "subtitle" (partial "golangci/items/format-description" .desc) -}} {{- /* Create tag information */ -}} - {{- $tagOptions := partial "item-tag.html" (dict "gcilVersion" $gcilVersion "item" .) -}} + {{- $tagOptions := partial "golangci/items/tag" (dict "gcilVersion" $gcilVersion "item" .) -}} {{- range $k, $v := $tagOptions -}} {{- $s.SetInMap "options" $k $v -}} {{- end -}} @@ -76,7 +76,7 @@ {{- if in .groups "standard" -}} {{- $class = $class | append "gl-default" -}} {{- end -}} - {{- if (partial "compare-versions.html" (dict "a" $gcilVersion "b" .since)) -}} + {{- if (partial "golangci/items/compare-versions" (dict "a" $gcilVersion "b" .since)) -}} {{- $class = $class | append "gl-new" -}} {{- end -}} diff --git a/docs/layouts/_shortcodes/clickable-badge.html b/docs/layouts/_shortcodes/golangci/items/filter-badge.html similarity index 62% rename from docs/layouts/_shortcodes/clickable-badge.html rename to docs/layouts/_shortcodes/golangci/items/filter-badge.html index d40e25f2fe87..ee24af4a0db8 100644 --- a/docs/layouts/_shortcodes/clickable-badge.html +++ b/docs/layouts/_shortcodes/golangci/items/filter-badge.html @@ -1,27 +1,27 @@ {{- /* 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. +Creates a badge with the given "data-filter" value. @param {string} content The content of the badge. @param {string} type The type of the badge. -@param {string} id The id of the badge. +@param {string} data The "data-filter" value for the badge. @param {string} class The class of the badge. @param {boolean} border Whether to render a border around the badge. @param {string} icon The icon of the badge. -@example {{< clickable-badge icon="inbox" id="my-id" content="Text" class="my-class" type="info" border=true >}} +@example {{< golangci/items/filter-badge icon="inbox" data="my-data" content="Text" class="my-class" type="info" border=true >}} */}} {{- $content := .Get "content" -}} {{- $type := .Get "type" | default "" -}} -{{- $id := .Get "id" | default "" -}} +{{- $data := .Get "data" | default "" -}} {{- $class := .Get "class" | default "" -}} {{- $icon := .Get "icon" | default "" -}} {{- $border := .Get "border" | default false -}} -{{- partial "clickable-badge.html" (dict - "id" $id - "class" $class +{{- partial "shortcodes/badge" (dict + "data" $data + "class" (printf "hx:mt-2 hx:mx-1 hx:cursor-pointer %s" $class) "content" $content "type" $type "border" $border diff --git a/docs/layouts/_shortcodes/golangci/items/filter.html b/docs/layouts/_shortcodes/golangci/items/filter.html new file mode 100644 index 000000000000..4b516cead9c2 --- /dev/null +++ b/docs/layouts/_shortcodes/golangci/items/filter.html @@ -0,0 +1,12 @@ +{{- /* +This shortcode is used to create a filter bar. + +@example {{< golangci/items/filter >}}{{< golangci/items/filter-badge content="Example">}}{{< golangci/items/filter >}} +*/ -}} + +
+ + {{- partial "utils/icon" (dict "name" "filter" "attributes" "height=1.2em") -}} + + {{ .Inner }} +
diff --git a/docs/layouts/_shortcodes/item-settings.html b/docs/layouts/_shortcodes/golangci/items/settings.html similarity index 77% rename from docs/layouts/_shortcodes/item-settings.html rename to docs/layouts/_shortcodes/golangci/items/settings.html index 68741c679355..177f9ff0c40c 100644 --- a/docs/layouts/_shortcodes/item-settings.html +++ b/docs/layouts/_shortcodes/golangci/items/settings.html @@ -4,7 +4,7 @@ @param {string} info The name of the data file containing the linter/formatter information. @param {string} settings The name of the data file containing the linter/formatter settings. -@example {{% item-settings info="formatters_info" settings="formatter_settings" %}} +@example {{% golangci/items/settings info="formatters_info" settings="formatter_settings" %}} */ -}} {{- $fileInfo := .Get "info" -}} @@ -27,14 +27,14 @@ {{- if .deprecation.replacement -}} {{- $replacement = print " Use `" .deprecation.replacement "` instead." -}} {{- end -}} -{{ print (partial "format-description" .deprecation.message) $replacement }} +{{ print (partial "golangci/items/format-description" .deprecation.message) $replacement }} {{ else }} -{{ partial "format-description" .desc }} +{{ partial "golangci/items/format-description" .desc }} {{ end }} {{/* Badges */}}

-{{ partial "shortcodes/badge.html" (dict +{{ partial "shortcodes/badge" (dict "border" false "icon" "calendar" "class" "hx:mx-1" @@ -42,7 +42,7 @@ ) }} {{ if .deprecation -}} -{{ partial "shortcodes/badge.html" (dict +{{ partial "shortcodes/badge" (dict "border" true "icon" "sparkles" "class" "hx:mx-1" @@ -51,8 +51,8 @@ ) }} {{ else }} - {{ if (partial "compare-versions.html" (dict "a" $gcilVersion "b" .since)) }} -{{ partial "shortcodes/badge.html" (dict + {{ if (partial "golangci/items/compare-versions" (dict "a" $gcilVersion "b" .since)) }} +{{ partial "shortcodes/badge" (dict "border" false "icon" "sparkles" "class" "hx:mx-1" @@ -62,7 +62,7 @@ }} {{ end }} {{ if .canAutoFix }} -{{ partial "shortcodes/badge.html" (dict +{{ partial "shortcodes/badge" (dict "border" false "icon" "sparkles" "class" "hx:mx-1" @@ -73,7 +73,7 @@ {{ end }} {{ end }} -{{ partial "shortcodes/badge.html" (dict +{{ partial "shortcodes/badge" (dict "border" true "icon" "github" "class" "hx:mx-1" diff --git a/docs/layouts/_shortcodes/latest-version.html b/docs/layouts/_shortcodes/golangci/latest-version.html similarity index 83% rename from docs/layouts/_shortcodes/latest-version.html rename to docs/layouts/_shortcodes/golangci/latest-version.html index fc8807b9a987..772bdd1b1350 100644 --- a/docs/layouts/_shortcodes/latest-version.html +++ b/docs/layouts/_shortcodes/golangci/latest-version.html @@ -2,7 +2,7 @@ Displays the latest version of golangci-lint. Based on the data file `data/version.json`. -@example {{< latest-version >}} +@example {{< golangci/latest-version >}} */ -}} {{- index $.Site.Data.version.version | default .Page.GitInfo.AbbreviatedHash | default "devel" -}} diff --git a/docs/layouts/_shortcodes/starcharts.html b/docs/layouts/_shortcodes/golangci/starcharts.html similarity index 88% rename from docs/layouts/_shortcodes/starcharts.html rename to docs/layouts/_shortcodes/golangci/starcharts.html index 7695e2ee4eb7..03bc310d408b 100644 --- a/docs/layouts/_shortcodes/starcharts.html +++ b/docs/layouts/_shortcodes/golangci/starcharts.html @@ -4,7 +4,7 @@ @param {string} repo The name of the GitHub repository. -@example {{< starcharts repo="golangci/golangci-lint" >}} +@example {{< golangci/starcharts repo="golangci/golangci-lint" >}} */ -}} {{- $repo := .Get "repo" -}}