Skip to content

Commit a9104bd

Browse files
committed
docs: migrate README.md to a website
Make a website https://golangci-lint.run for golangci-lint documentation. The website is backed by Gatsby static site generator and deployed into Netlify.
1 parent a85e1e1 commit a9104bd

35 files changed

+23016
-2131
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
Thank you for the pull request!
2-
3-
Please make sure you didn't directly change `README.md`: it should be changed only by changing `README.tmpl.md` and running `make README.md`.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
/tools/svg-term
1414
/.vscode/
1515
*.test
16+
.DS_Store

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ Follow the news and releases on our [twitter](https://twitter.com/golangci) and
22
There is the most valuable changes log:
33

44
### May 2020
5+
56
1. Add new linters: `nolintlint`, `goerr113`
6-
2. Updated linters: `godot`
7+
2. Updated linters: `godot`, `staticcheck`
78

89
### April 2020
910

1011
1. Add new linters: `testpackage`, `nestif`, `godot`, `gomodguard`, `asciicheck`
11-
2. Add github actions output format
12+
2. Add github actions output format
1213
3. Update linters: `wsl`, `gomodguard`, `gosec`
1314
4. Support `disabled-tags` setting for `gocritic`
1415
5. Mitigate OOM and "failed prerequisites"
@@ -63,4 +64,4 @@ There is the most valuable changes log:
6364
7. Support `--color` option
6465
8. Update x/tools to fix c++ issues
6566
9. Include support for log level
66-
10. Sort linters list in help commands
67+
10. Sort linters list in help commands

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ test_linters:
4242

4343
# Maintenance
4444

45-
generate: README.md assets/demo.svg install.sh assets/github-action-config.json
45+
generate: assets/demo.svg install.sh assets/github-action-config.json
4646
.PHONY: generate
4747

48-
fast_generate: README.md
48+
fast_generate:
4949
.PHONY: fast_generate
5050

5151
maintainer-clean: clean
52-
rm -rf assets/demo.svg README.md install.sh
52+
rm -rf assets/demo.svg install.sh
5353
.PHONY: maintainer-clean
5454

5555
check_generated:
@@ -98,9 +98,6 @@ assets/demo.svg: tools/svg-term tools/Dracula.itermcolors
9898
install.sh: .goreleaser.yml tools/godownloader
9999
./tools/godownloader .goreleaser.yml | sed '/DO NOT EDIT/s/ on [0-9TZ:-]*//' > $@
100100

101-
README.md: FORCE golangci-lint
102-
go run ./scripts/gen_readme/main.go
103-
104101
assets/github-action-config.json: FORCE golangci-lint
105102
go run ./scripts/gen_github_action_config/main.go $@
106103

README.md

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

README.tmpl.md

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

docs/.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# dotenv environment variable files
55+
.env*
56+
57+
# gatsby files
58+
.cache/
59+
public
60+
61+
# Mac files
62+
.DS_Store
63+
64+
# Yarn
65+
yarn-error.log
66+
.pnp/
67+
.pnp.js
68+
# Yarn Integrity file
69+
.yarn-integrity

docs/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Rocketseat
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

docs/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<p align="center">
2+
<img src="https://rocketseat-cdn.s3-sa-east-1.amazonaws.com/theme-docs.svg" alt="A illustration of file that is the @rocketseat/gatsby-theme-docs logo" width="100">
3+
</p>
4+
5+
<h2 align="center">
6+
Gatsby Starter: Rocket Docs
7+
</h2>
8+
9+
<p align="center">
10+
Out of the box Gatsby Starter for creating documentation websites easily and quickly. With support for MDX, code highlight, Analytics, SEO and more 🔥 Using the theme: <a href="https://github.com/Rocketseat/gatsby-themes/tree/master/%40rocketseat/gatsby-theme-docs">@rocketseat/gatsby-theme-docs</a>
11+
</p>
12+
13+
<p align="center">
14+
<img src="https://img.shields.io/badge/PRs-welcome-%237159c1.svg" alt="PRs welcome!" />
15+
16+
<img alt="License" src="https://img.shields.io/badge/license-MIT-%237159c1">
17+
18+
<a href="https://twitter.com/intent/follow?screen_name=rocketseat">
19+
<img src="https://img.shields.io/twitter/follow/rocketseat.svg?label=Follow%20@rocketseat" alt="Follow @rocketseat" />
20+
</a>
21+
</p>
22+
23+
## 🚀 Features
24+
25+
- MDX for docs;
26+
- Fully customizable through the usage of Gatsby Themes (and Theme UI)
27+
- Sidebar customization with Yaml;
28+
- Code highlighting with [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) and [react-live](https://github.com/FormidableLabs/react-live) support. Copy code button and option to show line numbers.
29+
- SEO (Sitemap, schema.org data, Open Graph and Twitter tags).
30+
- Google Analytics support;
31+
- Offline Support & WebApp Manifest
32+
33+
## ⚡️ Getting started
34+
35+
1. Create the website.
36+
37+
```sh
38+
gatsby new rocket-docs https://github.com/rocketseat/gatsby-starter-rocket-docs
39+
```
40+
41+
2. Start developing.
42+
43+
```sh
44+
cd rocket-docs
45+
gatsby develop
46+
```
47+
48+
3. Are you ready for launch?
49+
50+
Your site is now running at `http://localhost:8000`
51+
52+
## 📄 Docs
53+
54+
Looking for docs? Check our live demo and documentation [website](https://rocketdocs.netlify.com).
55+
56+
---
57+
58+
Made with 💜 by Rocketseat :wave: [check our community!](https://discordapp.com/invite/gCRAFhc)

docs/gatsby-config.js

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
const siteUrl = `https://golangci-lint.run`;
2+
3+
module.exports = {
4+
siteMetadata: {
5+
siteTitle: `golangci-lint`,
6+
defaultTitle: ``,
7+
siteTitleShort: `golangci-lint`,
8+
siteDescription: `Fast Go linters runner golangci-lint.`,
9+
siteUrl: siteUrl,
10+
siteAuthor: `@golangci`,
11+
siteImage: `/logo.png`,
12+
siteLanguage: `en`,
13+
themeColor: `#7159c1`,
14+
basePath: `/`,
15+
footer: ${new Date().getFullYear()}`,
16+
},
17+
plugins: [
18+
`gatsby-alias-imports`,
19+
{
20+
resolve: `@rocketseat/gatsby-theme-docs`,
21+
options: {
22+
configPath: `src/config`,
23+
docsPath: `src/docs`,
24+
githubUrl: `https://github.com/golangci/golangci-lint`,
25+
baseDir: `docs`,
26+
},
27+
},
28+
{
29+
resolve: `gatsby-plugin-manifest`,
30+
options: {
31+
name: `golangci-lint website`,
32+
short_name: `golangci-lint`,
33+
start_url: `/`,
34+
background_color: `#ffffff`,
35+
display: `standalone`,
36+
icon: `static/logo.png`,
37+
},
38+
},
39+
`gatsby-plugin-sitemap`,
40+
{
41+
resolve: `gatsby-plugin-google-analytics`,
42+
options: {
43+
trackingId: null, // TODO
44+
siteSpeedSampleRate: 100,
45+
},
46+
},
47+
{
48+
resolve: `gatsby-plugin-canonical-urls`,
49+
options: {
50+
siteUrl: siteUrl,
51+
},
52+
},
53+
`gatsby-plugin-offline`,
54+
{
55+
resolve: "gatsby-plugin-react-svg",
56+
options: {
57+
rule: {
58+
include: /logo\.svg$/,
59+
},
60+
},
61+
},
62+
{
63+
resolve: `gatsby-transformer-remark`,
64+
options: {
65+
plugins: [`gatsby-remark-external-links`],
66+
},
67+
},
68+
`gatsby-plugin-netlify`,
69+
`gatsby-plugin-netlify-cache`,
70+
],
71+
};

0 commit comments

Comments
 (0)