Skip to content

Commit 5b7fcf1

Browse files
ronethingAlinsRan
andauthored
docs: update getting started docs (RC2) (#2481) (#209)
Signed-off-by: ashing <[email protected]> Co-authored-by: AlinsRan <[email protected]>
1 parent e2c3632 commit 5b7fcf1

19 files changed

+2148
-160
lines changed
Submodule markdown-link-check added at 0524e79

.github/actions/paths-filter

Submodule paths-filter added at de90cc6

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
make generate-crd-docs
6161
- name: Check CRD Docs Diff
6262
run: |
63-
if ! git diff --exit-code -- docs/crd/api.md; then
64-
echo "docs/crd/api.md has changed. Please run 'make generate-crd-docs' and commit the updated file."
63+
if ! git diff --exit-code -- docs/en/latest/reference/api-reference.md; then
64+
echo "docs/en/latest/reference/api-reference.md has changed. Please run 'make generate-crd-docs' and commit the updated file."
6565
exit 1
6666
fi

.github/workflows/lint-checker.yml

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,48 @@ on:
2929
- release-v2-dev
3030

3131
jobs:
32+
changes:
33+
runs-on: ubuntu-latest
34+
outputs:
35+
docs: ${{ steps.filter.outputs.docs }}
36+
go: ${{ steps.filter.outputs.go }}
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
with:
41+
submodules: recursive
42+
43+
- uses: ./.github/actions/paths-filter
44+
id: filter
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
filters: |
48+
docs:
49+
- 'docs/**/*'
50+
- '*.md'
51+
go:
52+
- '*.go'
53+
- '**/*.go'
54+
- 'go.mod'
55+
- 'go.sum'
56+
- 'Makefile'
57+
- 'Dockerfile'
58+
- 'test/e2e/**/*'
59+
- 'conf/**'
60+
- 'utils/**'
61+
- ".github/**"
62+
3263
run-test:
64+
needs: changes
65+
if: |
66+
(needs.changes.outputs.go == 'true')
67+
runs-on: ubuntu-latest
3368
steps:
3469
- uses: actions/checkout@v4
3570
- name: Setup Go Env
3671
uses: actions/setup-go@v4
3772
with:
38-
go-version: '1.21'
73+
go-version: "1.23"
3974
- name: run gofmt
4075
working-directory: ./
4176
run: |
@@ -46,6 +81,9 @@ jobs:
4681
exit 1
4782
fi
4883
markdownlint:
84+
needs: changes
85+
if: |
86+
(needs.changes.outputs.docs == 'true')
4987
name: 🍇 Markdown
5088
runs-on: ubuntu-latest
5189
steps:
@@ -55,8 +93,15 @@ jobs:
5593
with:
5694
node-version: '20.7.x'
5795
- run: npm install -g [email protected]
58-
- run: markdownlint '**/*.md' --ignore node_modules --ignore CHANGELOG.md --ignore docs/en/latest/references/v2.md
96+
- run: |
97+
markdownlint '**/*.md' \
98+
--ignore node_modules \
99+
--ignore CHANGELOG.md \
100+
--ignore docs/en/latest/reference/api-reference.md
59101
markdown-link-check:
102+
needs: changes
103+
if: |
104+
(needs.changes.outputs.docs == 'true')
60105
runs-on: ubuntu-latest
61106
name: Check Markdown links
62107
steps:
@@ -68,8 +113,8 @@ jobs:
68113
use-quiet-mode: 'yes'
69114
use-verbose-mode: 'yes'
70115
config-file: 'link-check-config.json'
71-
folder-path: 'docs/en'
72-
file-path: './README.md, ./install.md, ./test/e2e/README.md'
116+
folder-path: 'docs'
117+
file-path: './README.md'
73118
max-depth: -1
74119
file-extension: ".md"
75120
check-modified-files-only: "no"

.markdownlint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
# MD004/ul-style Unordered list style
19+
MD004: false
20+
21+
# MD013 Line length
22+
MD013: false
23+
24+
#MD029/ol-prefix Ordered list item prefix
25+
MD029: false
26+
27+
# MD033 Inline HTML
28+
MD033: false
29+
30+
# MD036/no-emphasis-as-heading/no-emphasis-as-header Emphasis used instead of a heading
31+
MD036: false
32+
33+
MD041: false
34+
35+
# MD024
36+
no-duplicate-heading:
37+
siblings_only: true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ E2E_NODES ?= 2
4141
CRD_REF_DOCS_VERSION ?= v0.1.0
4242
CRD_REF_DOCS ?= $(LOCALBIN)/crd-ref-docs
4343
CRD_DOCS_CONFIG ?= docs/assets/crd/config.yaml
44-
CRD_DOCS_OUTPUT ?= docs/en/latest/api-reference.md
44+
CRD_DOCS_OUTPUT ?= docs/en/latest/reference/api-reference.md
4545
CRD_DOCS_TEMPLATE ?= docs/assets/template
4646

4747
export KUBECONFIG = /tmp/$(KIND_NAME).kubeconfig

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,3 @@ Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project
8181
```sh
8282
kubectl apply -f dist/install.yaml
8383
```
84-
85-
## License
86-
87-
Copyright 2024.
88-
89-
Licensed under the Apache License, Version 2.0 (the "License");
90-
you may not use this file except in compliance with the License.
91-
You may obtain a copy of the License at
92-
93-
http://www.apache.org/licenses/LICENSE-2.0
94-
95-
Unless required by applicable law or agreed to in writing, software
96-
distributed under the License is distributed on an "AS IS" BASIS,
97-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
98-
See the License for the specific language governing permissions and
99-
limitations under the License.

docs/assets/template/gv_details.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
### Types
4141

42-
In this section you will find types that the CRDs rely on.
42+
This section describes the types used by the CRDs.
4343

4444
{{- /* Display Types that are not exported Kinds */ -}}
4545
{{- range $typ := $gv.SortedTypes -}}

docs/assets/template/gv_list.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323
---
2424
title: Custom Resource Definitions API Reference
25-
slug: /reference/apisix-ingress-controller/crd-reference
25+
slug: /reference/apisix-ingress-controller/api-reference
2626
description: Explore detailed reference documentation for the custom resource definitions (CRDs) supported by the APISIX Ingress Controller.
2727
---
2828

29-
This document provides the API resource description the APISIX Ingress Controller custom resource definitions (CRDs).
29+
This document provides the API resource description for the APISIX Ingress Controller custom resource definitions (CRDs).
3030

3131
## Packages
3232
{{- range $groupVersions }}

docs/en/latest/config.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@
33
"sidebar": [
44
{
55
"type": "doc",
6-
"id": "getting-started"
6+
"id": "overview"
7+
},
8+
{
9+
"type": "category",
10+
"label": "Getting Started",
11+
"items": [
12+
"getting-started/get-apisix-ingress-controller",
13+
"getting-started/configure-routes",
14+
"getting-started/load-balancing",
15+
"getting-started/key-authentication",
16+
"getting-started/rate-limiting"
17+
]
718
},
819
{
920
"type": "category",
@@ -23,8 +34,12 @@
2334
"id": "developer-guide"
2435
},
2536
{
26-
"type": "doc",
27-
"id": "api-reference"
37+
"type": "category",
38+
"label": "Reference",
39+
"items": [
40+
"reference/api-reference",
41+
"reference/example"
42+
]
2843
},
2944
{
3045
"type": "doc",

0 commit comments

Comments
 (0)