Skip to content

Commit 1a529e7

Browse files
committed
docs: update getting started docs (RC2) (#2481)
Signed-off-by: ashing <[email protected]>
1 parent 43c716a commit 1a529e7

18 files changed

+2084
-157
lines changed

.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"

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

config/crd/bases/apisix.apache.org_apisixconsumers.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ spec:
168168
algorithm:
169169
description: |-
170170
Algorithm specifies the signing algorithm.
171-
Can be `HS256`, `HS384`, `HS512`, `RS256`, `RS384`, `RS512`, `ES256`, `ES384`, `ES512`, `PS256`, `PS384`, `PS512`, or `EdDSA`.
172-
Currently APISIX only supports `HS256`, `HS512`, `RS256`, and `ES256`. API7 Enterprise supports all algorithms.
171+
Can be `HS256`, `HS512`, `RS256`, or `ES256`.
173172
type: string
174173
base64_secret:
175174
description: Base64Secret indicates whether the secret

config/crd/bases/apisix.apache.org_apisixroutes.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ spec:
203203
subject:
204204
description: |-
205205
Subject defines the left-hand side of the expression.
206-
It can be any [built-in variable](/apisix/reference/built-in-variables) or string literal.
206+
It can be any [APISIX variable](https://apisix.apache.org/docs/apisix/apisix-variable) or string literal.
207207
properties:
208208
name:
209209
description: Name is the name of the header or
@@ -233,7 +233,6 @@ spec:
233233
description: |-
234234
FilterFunc is a user-defined function for advanced request filtering.
235235
The function can use Nginx variables through the `vars` parameter.
236-
This field is supported in APISIX but not in API7 Enterprise.
237236
type: string
238237
hosts:
239238
description: |-

config/crd/bases/apisix.apache.org_apisixupstreams.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ spec:
279279
When HashOn is `header` or `cookie`, specifies the name of the header or cookie.
280280
When HashOn is `consumer`, key is not required, as the consumer name is used automatically.
281281
When HashOn is `vars` or `vars_combinations`, key refers to one or a combination of
282-
[built-in variables](/enterprise/reference/built-in-variables).
282+
[APISIX variables](https://apisix.apache.org/docs/apisix/apisix-variable).
283283
type: string
284284
type:
285285
default: roundrobin
@@ -524,7 +524,7 @@ spec:
524524
When HashOn is `header` or `cookie`, specifies the name of the header or cookie.
525525
When HashOn is `consumer`, key is not required, as the consumer name is used automatically.
526526
When HashOn is `vars` or `vars_combinations`, key refers to one or a combination of
527-
[built-in variables](/enterprise/reference/built-in-variables).
527+
[APISIX variables](https://apisix.apache.org/docs/apisix/apisix-variable).
528528
type: string
529529
type:
530530
default: roundrobin

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+
"get-apisix-ingress-controller",
13+
"configure-routes",
14+
"load-balancing",
15+
"key-authentication",
16+
"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)