Skip to content

Commit a5e1ed2

Browse files
Doc contribution
Signed-off-by: Thomas Poignant <[email protected]>
1 parent d9265da commit a5e1ed2

File tree

3 files changed

+28
-32
lines changed

3 files changed

+28
-32
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ Every feature or bug should come with an associate test to keep the coverage as
2626

2727
We are maintaining 2 documentations:
2828
- [README.md](README.md) which contains everything you need to know to start working with the module.
29-
- [go-feature-flag website](https://thomaspoignant.github.io/go-feature-flag/) which is the full detail documentation of the module.
29+
- [go-feature-flag website](https://gofeatureflag.org) which is the full detail website containing the documentation.
3030

31-
If your contribution has impact on the documentation, please check both version.
31+
If your contribution has impact on the documentation, please check both version. You can check how to work on the documentation [here](./website/README.md).
3232

3333
### How to run the documentation website locally
3434

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ watch-relayproxy: ## Launch the relay proxy in watch mode.
4545
--build.cmd "go build -mod vendor -o out/bin/relayproxy ./cmd/relayproxy/" \
4646
--build.bin "./out/bin/relayproxy"
4747

48+
watch-doc: ## Launch a local server to work on the documentation
49+
cd website; \
50+
npm i && npx docusaurus start
51+
52+
serve-doc: ## Serve the doc build by the build-doc target
53+
cd website; \
54+
npm run serve
55+
4856
swagger: ## Build swagger documentation
4957
$(GOCMD) install github.com/swaggo/swag/cmd/swag@latest
5058
cd cmd/relayproxy && swag init --markdownFiles docs

website/README.md

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,29 @@
1-
# Website
1+
# How to contribute to GO Feature Flag website
22

3-
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
44

5-
### Installation
5+
You will need to have **nodejs** installed in your machine to work with the documentation website.
66

7-
```
8-
$ yarn
9-
```
10-
11-
### Local Development
12-
13-
```
14-
$ yarn start
15-
```
16-
17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
187

19-
### Build
8+
## Launch locally
209

21-
```
22-
$ yarn build
23-
```
24-
25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26-
27-
### Deployment
10+
Your can start locally the website.
2811

29-
Using SSH:
30-
31-
```
32-
$ USE_SSH=true yarn deploy
12+
1. Open a terminal and go to the root project of this repository.
13+
2. Launch the command bellow, it will install the dependencies and run the local server for the documentation.
14+
```shell
15+
make watch-doc
3316
```
17+
3. You can now access to the documentation directly in your browser: [http://localhost:3000/](http://localhost:3000/).
3418

35-
Not using SSH:
3619

20+
## Build the documentation
21+
1. Open a terminal and go to the root project of this repository.
22+
2. Launch the command bellow, it will install the dependencies and build the documentation.
23+
```shell
24+
make build-doc
3725
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
26+
3. If you want to see the result of your build, you can serve it with this command:
27+
```shell
28+
make serve-doc
3929
```
40-
41-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

0 commit comments

Comments
 (0)