Skip to content

dev: new way to fill the documentation #5986

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 30 commits into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c9a8c7a
chore: update gitignore
ldez Aug 7, 2025
9a518c5
feat: rewrite dump_info
ldez Aug 7, 2025
cafeabe
feat: rewrite expand_templates
ldez Aug 7, 2025
cd3fd2b
chore: generate files
ldez Aug 7, 2025
4243899
feat: cli output shortcode
ldez Aug 7, 2025
396024b
feat: latest version shortcode
ldez Aug 7, 2025
e467b9b
feat: embed shortcode
ldez Aug 7, 2025
f4df7ef
feat: exclusion presets shortcode
ldez Aug 7, 2025
4bb4d5c
feat: thanks shortcode
ldez Aug 7, 2025
139d444
feat: item cards shortcode
ldez Aug 7, 2025
23ef13e
feat: item settings shortcode
ldez Aug 7, 2025
9f8050c
feat: configuration file snippet shortcode
ldez Aug 7, 2025
234194f
chore: update Makefile
ldez Aug 7, 2025
355532a
docs: update contributing section
ldez Aug 7, 2025
95b9c42
chore: improve CLI help output
ldez Aug 7, 2025
3adb1b0
chore: add build target to help during debug
ldez Aug 8, 2025
bb74bd9
chore: add original fragment partial
ldez Aug 8, 2025
bf2810d
chore: fix fragment partial
ldez Aug 8, 2025
88952f1
chore: simplity buttons style
ldez Aug 8, 2025
a50ec4f
feat: improve thanks page
ldez Aug 8, 2025
c8d590d
feat: item filter (linters/formatters)
ldez Aug 8, 2025
06768c0
feat: better render for gha images
ldez Aug 8, 2025
ccb8614
feat: change donate menu text
ldez Aug 9, 2025
26d0bd5
chore: update CI workflows
ldez Aug 10, 2025
dcc702e
docs: update website contributing page
ldez Aug 10, 2025
b4e8f8f
review
ldez Aug 10, 2025
c862881
chore: wording
ldez Aug 10, 2025
eab739b
fix: filter on mobile
ldez Aug 10, 2025
68b404e
chore: remove dead code
ldez Aug 10, 2025
7b6d98c
chore: rename
ldez Aug 10, 2025
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
13 changes: 1 addition & 12 deletions .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,8 @@ jobs:
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build Documentation assets
run: make website_copy_jsonschema website_expand_templates

- name: Build Documentation
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
working-directory: ./docs
run: |
hugo \
--gc --minify \
--baseURL "https://golangci-lint.run/"
run: make docs_build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/pr-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,4 @@ jobs:
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build Documentation
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
working-directory: ./docs
run: |
hugo \
--gc --minify \
--baseURL "https://golangci-lint.run/"
run: make docs_build
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ If you value it, consider supporting us, we appreciate it!

[![Donate](https://img.shields.io/badge/Donate-❤️-blue?style=for-the-badge)](https://donate.golangci.org)

<!-- START --->

### v2.3.1

1. Linters bug fixes
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,18 @@ go.sum: go.mod

# Documentation

docs_serve:
docs_serve: website_expand_templates
@make -C ./docs serve
.PHONY: docs_serve

docs_reset:
@make -C ./docs reset
.PHONY: docs_reset

docs_clean:
@make -C ./docs clean
.PHONY: docs_clean

docs_build: website_copy_jsonschema website_expand_templates
@make -C ./docs build
.PHONY: docs_build

docs/static/demo.gif: FORCE
vhs docs/golangci-lint.tape

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Documentation is hosted at https://golangci-lint.run.
[![Follow on Bluesky](https://img.shields.io/badge/Bluesky-0a7aff?logo=bluesky&logoColor=white)](https://bsky.app/profile/golangci-lint.run)
[![Follow on Twitter](https://img.shields.io/badge/Twitter-1DA1F2?logo=x&logoColor=white)](https://twitter.com/golangci)

## Supporting Us
## Support Us

[![Open Collective backers and sponsors](https://img.shields.io/badge/OpenCollective-Donate-blue?logo=opencollective&style=for-the-badge)](https://opencollective.com/golangci-lint)
[![GitHub Sponsors](https://img.shields.io/badge/GitHub-Donate-blue?logo=github&style=for-the-badge)](https://github.com/sponsors/golangci)
Expand Down
15 changes: 0 additions & 15 deletions assets/cli-help.json

This file was deleted.

7 changes: 6 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Hugo files
.hugo_build.lock
public/
/static/jsonschema/
resources/

# Generated files
/static/jsonschema/
data/version.json
.tmp/
15 changes: 10 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
.PHONY: default clean reset serve
.PHONY: default clean serve build

default: clean serve

clean:
rm -rf public/

reset:
git checkout HEAD content/

serve: clean
hugo server --disableFastRender --buildDrafts --enableGitInfo --watch --source .
hugo server --disableFastRender --buildDrafts --enableGitInfo

# IMPORTANT used by the CI to deploy documentation
build: clean
HUGO_ENVIRONMENT=production \
HUGO_ENV=production \
hugo \
--gc --minify \
--baseURL "https://golangci-lint.run/"
8 changes: 8 additions & 0 deletions docs/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
.hx-line-clamp-3.hextra-card-subtitle {
-webkit-line-clamp: 30;
}

.author-cards {
grid-template-columns: repeat(auto-fill, minmax(max(150px, calc((100% - 1rem * 4) / var(--hextra-cards-grid-cols))), 1fr));
}

.gl-hidden {
display: none;
}
6 changes: 2 additions & 4 deletions docs/content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@ title: 'Golangci-lint Documentation'
icon="arrow-circle-right" >}}
{{< /cards >}}


## Supporting Us
## Support Us

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-mb-6"></div>
<div class="hx-mb-6">
<div class="hx-mt-6 hx-mb-6">
{{< hextra/hero-button text="Donate ❤️" link="https://donate.golangci.org" >}}
</div>

Expand Down
60 changes: 12 additions & 48 deletions docs/content/docs/configuration/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ title: Command-Line
weight: 1
---

```console
$ golangci-lint -h
{.CmdRootHelpText}
```
{{% cli-output %}}

## `run`

Expand All @@ -16,10 +13,7 @@ $ golangci-lint -h
{{< card link="/docs/linters/configuration/" title="Linter Settings" icon="adjustments" >}}
{{< /cards >}}

```console
$ golangci-lint run -h
{.CmdRunHelpText}
```
{{% 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.
Expand All @@ -35,38 +29,23 @@ the `go tool trace` command and visualization tool.
{{< card link="/docs/formatters/configuration/" title="Formatter Settings" icon="adjustments" >}}
{{< /cards >}}

```console
$ golangci-lint fmt -h
{.CmdFmtHelpText}
```
{{% cli-output cmd="fmt" %}}

## `migrate`

```console
$ golangci-lint migrate -h
{.CmdMigrateHelpText}
```
{{% cli-output cmd="migrate" %}}

## `formatters`

```console
$ golangci-lint formatters -h
{.CmdFormattersHelpText}
```
{{% cli-output cmd="formatters" %}}

## `help`

```console
$ golangci-lint help -h
{.CmdHelpText}
```
{{% cli-output cmd="help" %}}

## `linters`

```console
$ golangci-lint linters -h
{.CmdLintersHelpText}
```
{{% cli-output cmd="linters" %}}

## `cache`

Expand All @@ -76,35 +55,20 @@ You can override the default cache directory with the environment variable `GOLA

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

```console
$ golangci-lint cache -h
{.CmdCacheHelpText}
```
{{% cli-output cmd="cache" %}}

## `config`

```console
$ golangci-lint config -h
{.CmdConfigHelpText}
```
{{% cli-output cmd="config" %}}

## `custom`

```console
$ golangci-lint custom -h
{.CmdCustomHelpText}
```
{{% cli-output cmd="custom" %}}

## `version`

```console
$ golangci-lint version -h
{.CmdVersionHelpText}
```
{{% cli-output cmd="version" %}}

## `completion`

```console
$ golangci-lint completion -h
{.CmdCompletionHelpText}
```
{{% cli-output cmd="completion" %}}
Loading
Loading