Skip to content

Commit aa726dc

Browse files
authored
dev: new way to fill the documentation (#5986)
1 parent 18bf59c commit aa726dc

Some content is hidden

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

79 files changed

+2330
-1371
lines changed

.github/workflows/deploy-documentation.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,8 @@ jobs:
3131
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
3232
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
3333
34-
- name: Build Documentation assets
35-
run: make website_copy_jsonschema website_expand_templates
36-
3734
- name: Build Documentation
38-
env:
39-
# For maximum backward compatibility with Hugo modules
40-
HUGO_ENVIRONMENT: production
41-
HUGO_ENV: production
42-
working-directory: ./docs
43-
run: |
44-
hugo \
45-
--gc --minify \
46-
--baseURL "https://golangci-lint.run/"
35+
run: make docs_build
4736

4837
- name: Deploy to GitHub Pages
4938
uses: peaceiris/actions-gh-pages@v4

.github/workflows/pr-documentation.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,4 @@ jobs:
3131
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
3232
3333
- name: Build Documentation
34-
env:
35-
# For maximum backward compatibility with Hugo modules
36-
HUGO_ENVIRONMENT: production
37-
HUGO_ENV: production
38-
working-directory: ./docs
39-
run: |
40-
hugo \
41-
--gc --minify \
42-
--baseURL "https://golangci-lint.run/"
34+
run: make docs_build

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ If you value it, consider supporting us, we appreciate it!
66

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

9+
<!-- START --->
10+
911
### v2.3.1
1012

1113
1. Linters bug fixes

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,18 @@ go.sum: go.mod
101101

102102
# Documentation
103103

104-
docs_serve:
104+
docs_serve: website_expand_templates
105105
@make -C ./docs serve
106106
.PHONY: docs_serve
107107

108-
docs_reset:
109-
@make -C ./docs reset
110-
.PHONY: docs_reset
111-
112108
docs_clean:
113109
@make -C ./docs clean
114110
.PHONY: docs_clean
115111

112+
docs_build: website_copy_jsonschema website_expand_templates
113+
@make -C ./docs build
114+
.PHONY: docs_build
115+
116116
docs/static/demo.gif: FORCE
117117
vhs docs/golangci-lint.tape
118118

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Documentation is hosted at https://golangci-lint.run.
2727
[![Follow on Bluesky](https://img.shields.io/badge/Bluesky-0a7aff?logo=bluesky&logoColor=white)](https://bsky.app/profile/golangci-lint.run)
2828
[![Follow on Twitter](https://img.shields.io/badge/Twitter-1DA1F2?logo=x&logoColor=white)](https://twitter.com/golangci)
2929

30-
## Supporting Us
30+
## Support Us
3131

3232
[![Open Collective backers and sponsors](https://img.shields.io/badge/OpenCollective-Donate-blue?logo=opencollective&style=for-the-badge)](https://opencollective.com/golangci-lint)
3333
[![GitHub Sponsors](https://img.shields.io/badge/GitHub-Donate-blue?logo=github&style=for-the-badge)](https://github.com/sponsors/golangci)

assets/cli-help.json

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

docs/.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
# Hugo files
12
.hugo_build.lock
23
public/
3-
/static/jsonschema/
44
resources/
5+
6+
# Generated files
7+
/static/jsonschema/
8+
data/version.json
9+
.tmp/

docs/Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
.PHONY: default clean reset serve
1+
.PHONY: default clean serve build
22

33
default: clean serve
44

55
clean:
66
rm -rf public/
77

8-
reset:
9-
git checkout HEAD content/
10-
118
serve: clean
12-
hugo server --disableFastRender --buildDrafts --enableGitInfo --watch --source .
9+
hugo server --disableFastRender --buildDrafts --enableGitInfo
10+
11+
# IMPORTANT used by the CI to deploy documentation
12+
build: clean
13+
HUGO_ENVIRONMENT=production \
14+
HUGO_ENV=production \
15+
hugo \
16+
--gc --minify \
17+
--baseURL "https://golangci-lint.run/"

docs/assets/css/custom.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@
88
.hx-line-clamp-3.hextra-card-subtitle {
99
-webkit-line-clamp: 30;
1010
}
11+
12+
.author-cards {
13+
grid-template-columns: repeat(auto-fill, minmax(max(150px, calc((100% - 1rem * 4) / var(--hextra-cards-grid-cols))), 1fr));
14+
}
15+
16+
.gl-hidden {
17+
display: none;
18+
}

docs/content/docs/_index.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ title: 'Golangci-lint Documentation'
2626
icon="arrow-circle-right" >}}
2727
{{< /cards >}}
2828

29-
30-
## Supporting Us
29+
## Support Us
3130

3231
Golangci-lint is a free and open-source project built by volunteers.
3332

3433
If you value it, consider supporting us, we appreciate it!
3534

36-
<div class="hx-mb-6"></div>
37-
<div class="hx-mb-6">
35+
<div class="hx-mt-6 hx-mb-6">
3836
{{< hextra/hero-button text="Donate ❤️" link="https://donate.golangci.org" >}}
3937
</div>
4038

0 commit comments

Comments
 (0)