-
Notifications
You must be signed in to change notification settings - Fork 262
Docs: Add external link validation with lychee #4707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Copyright 2026 The kpt Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Weekly documentation verification: spelling and external link checking. | ||
|
|
||
| name: Docs Weekly | ||
| on: | ||
| schedule: | ||
| - cron: '0 3 * * 1' # Every Monday at 03:00 UTC | ||
| workflow_dispatch: # Allow manual triggering | ||
|
|
||
| jobs: | ||
| docs-verify: | ||
| name: docs-verify | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| submodules: true | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: documentation/go.mod | ||
| cache: false | ||
|
|
||
| - name: Get Hugo version | ||
| id: hugo-version | ||
| run: echo "version=$(grep -m1 'HUGO_VERSION' documentation/netlify.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Set up Hugo | ||
| uses: peaceiris/actions-hugo@v3 | ||
| with: | ||
| hugo-version: ${{ steps.hugo-version.outputs.version }} | ||
| extended: true | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version-file: documentation/package.json | ||
|
|
||
| - name: Install Node dependencies | ||
| working-directory: documentation | ||
| run: npm install | ||
|
|
||
| - name: Verify spelling | ||
| working-directory: documentation | ||
| run: make verify | ||
|
|
||
| - name: Build site | ||
| working-directory: documentation | ||
| run: make production-build | ||
|
|
||
| - name: Check external links | ||
| uses: lycheeverse/lychee-action@v2 | ||
| with: | ||
| args: '-vv --config lychee.toml --root-dir public --extensions html public' | ||
| lycheeVersion: v0.24.2 | ||
| fail: true | ||
| workingDirectory: documentation |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,11 +8,11 @@ menu: | |
| parent: "Schema Reference" | ||
| --- | ||
|
|
||
| `kpt` includes custom rules for [Config Connector](https://cloud.google.com/config-connector/docs/overview) resources to | ||
| `kpt` includes custom rules for [Config Connector](https://docs.cloud.google.com/config-connector/docs/overview) resources to | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder should this page be dropped/refactored too as it's GCP specific
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. Do we need to confirm this with community before proceed to remove ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should mention it. |
||
| make them easier to work with. This document describes how kpt uses fields and conditions on Config Connector | ||
| resources to compute [reconcile status]({{% relref "/book/06-deploying-packages#reconcile-status" %}}). | ||
|
|
||
| [Config Connector](https://cloud.google.com/config-connector/docs/how-to/monitoring-your-resources) resources expose the | ||
| [Config Connector](https://docs.cloud.google.com/config-connector/docs/how-to/monitoring-your-resources) resources expose the | ||
| `observedGeneration` field in the status object, and `kpt` will always report a resource as being `InProgress` if the | ||
| `observedGeneration` doesn't match the value of `metadata.generation`. | ||
|
|
||
|
|
@@ -22,7 +22,7 @@ as `Current`, i.e it has been successfully reconciled. | |
| If the `Ready` condition is `False`, `kpt` will look at the `Reason` field on the | ||
| condition object to determine whether the resource is making progress towards | ||
| reconciliation. The possible values mirrors those used by | ||
| [Config Connector events](https://cloud.google.com/config-connector/docs/how-to/monitoring-your-resources#viewing_events). | ||
| [Config Connector events](https://docs.cloud.google.com/config-connector/docs/how-to/monitoring-your-resources#viewing_events). | ||
| If the value is one of the following, the resource is considered to have failed | ||
| reconciliation: | ||
| - `ManagementConflict` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Copyright 2026 The kpt Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # lychee configuration for external link validation. | ||
| # See https://lychee.cli.rs for full documentation. | ||
| # | ||
| # Run: make check-links-external | ||
| # With GitHub token (recommended): GITHUB_TOKEN=<token> make check-links-external | ||
|
|
||
| # Only check http/https links. | ||
| scheme = ["https", "http"] | ||
|
|
||
| # Resolve root-relative links against the Hugo output directory. | ||
| root_dir = "public" | ||
|
|
||
| require_https = true | ||
| timeout = 30 | ||
| max_retries = 3 | ||
| max_concurrency = 64 | ||
| accept_timeouts = true | ||
| user_agent = "Mozilla/5.0 (compatible; kpt-link-checker; +https://kpt.dev)" | ||
|
|
||
| # Exclude URLs from checking (regex patterns). | ||
| exclude = [ | ||
| # Slack requires authentication; always returns 403 to bots. | ||
| "^https://kubernetes\\.slack\\.com", | ||
| "^https://slack\\.k8s\\.io", | ||
| # GitHub org project boards require a browser session. | ||
| "^https://github\\.com/orgs/.*/projects/", | ||
| # Netlify intermittently blocks CI runners. | ||
| "^https://www\\.netlify\\.com", | ||
| # Docsy theme "Edit this page" and "Create issue" links always redirect to login. | ||
| "^https://github\\.com/kptdev/kpt/edit/", | ||
| "^https://github\\.com/kptdev/kpt/issues/new", | ||
| ] | ||
|
|
||
| # Per-host rate limiting to avoid triggering abuse detection. | ||
| [hosts."github.com"] | ||
| concurrency = 1 | ||
| request_interval = "3s" |
Uh oh!
There was an error while loading. Please reload this page.