Skip to content

Commit 4e60875

Browse files
authored
Merge pull request #2531 from chuckha/links
🏃Fix all 404s in book and add a verify script to ensure there are no 404s
2 parents 7d1358c + 72ebca7 commit 4e60875

File tree

14 files changed

+55
-7
lines changed

14 files changed

+55
-7
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ E2E_FRAMEWORK_DIR := test/framework
4646
CAPD_DIR := test/infrastructure/docker
4747
RELEASE_NOTES_BIN := bin/release-notes
4848
RELEASE_NOTES := $(TOOLS_DIR)/$(RELEASE_NOTES_BIN)
49+
LINK_CHECKER_BIN := bin/liche
50+
LINK_CHECKER := $(TOOLS_DIR)/$(LINK_CHECKER_BIN)
4951

5052
# Binaries.
5153
# Need to use abspath so we can invoke these from subdirectories
@@ -170,6 +172,9 @@ $(GOBINDATA): $(TOOLS_DIR)/go.mod # Build go-bindata from tools folder.
170172
$(RELEASE_NOTES): $(TOOLS_DIR)/go.mod
171173
cd $(TOOLS_DIR) && go build -tags=tools -o $(RELEASE_NOTES_BIN) ./release
172174

175+
$(LINK_CHECKER): $(TOOLS_DIR)/go.mod
176+
cd $(TOOLS_DIR) && go build -tags=tools -o $(LINK_CHECKER_BIN) github.com/raviqqe/liche
177+
173178
.PHONY: e2e-framework
174179
e2e-framework: ## Builds the CAPI e2e framework
175180
cd $(E2E_FRAMEWORK_DIR); go build ./...
@@ -521,6 +526,7 @@ verify:
521526
./hack/verify-doctoc.sh
522527
./hack/verify-shellcheck.sh
523528
./hack/verify-starlark.sh
529+
$(MAKE) verify-book-links
524530
$(MAKE) verify-modules
525531
$(MAKE) verify-gen
526532
$(MAKE) verify-docker-provider
@@ -544,6 +550,10 @@ verify-docker-provider:
544550
@echo "Verifying CAPD"
545551
cd $(CAPD_DIR); $(MAKE) verify
546552

553+
.PHONY: verify-book-links
554+
verify-book-links: $(LINK_CHECKER)
555+
# Ignore localhost links and set concurrency to a reasonable number
556+
$(LINK_CHECKER) -r docs/book -x "^https?://localhost($|[:/].*)" -c 10
547557
## --------------------------------------
548558
## Others / Utilities
549559
## --------------------------------------

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ API design. Because of this, all of the codebase is rapidly changing.
3636
- Weekly on Wednesdays @ 10:00 PT on [Zoom][zoomMeeting]
3737
- Previous meetings: \[ [notes][notes] | [recordings][recordings] \]
3838
- Provider implementers office hours where you can ask questions related to developing providers for Cluster API
39-
- Weekly on Tuesdays @ 12:00 PT ([Zoom](providerZoomMeetingTues)) and Wednesdays @ 15:00 CET ([Zoom](providerZoomMeetingWed))
39+
- Weekly on Tuesdays @ 12:00 PT ([Zoom][providerZoomMeetingTues]) and Wednesdays @ 15:00 CET ([Zoom][providerZoomMeetingWed])
4040
- Previous meetings: \[ [notes][implementerNotes] \]
4141

4242
Pull Requests and feedback on issues are very welcome!

docs/book/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
- [Developer Guide](./developer/guide.md)
2424
- [Repository Layout](./developer/repository-layout.md)
2525
- [Rapid iterative development with Tilt](./developer/tilt.md)
26+
- [Testing](./developer/testing.md)
2627
- [Controllers](./developer/architecture/controllers.md)
2728
- [Bootstrap](./developer/architecture/controllers/bootstrap.md)
2829
- [Cluster](./developer/architecture/controllers/cluster.md)

docs/book/src/developer/architecture/controllers/cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The Cluster controller's main responsibilities are:
77
* Setting an OwnerReference on the infrastructure object referenced in `Cluster.Spec.InfrastructureRef`.
88
* Cleanup of all owned objects so that nothing is dangling after deletion.
99
* Keeping the Cluster's status in sync with the infrastructure Cluster's status.
10-
* Creating a kubeconfig secret for [workload clusters](../../reference/glossary.html#workload-cluster).
10+
* Creating a kubeconfig secret for [workload clusters](../../../reference/glossary.md#workload-cluster).
1111

1212
## Contracts
1313

docs/book/src/developer/architecture/controllers/machine-deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MachineDeployment
22

3-
A MachineDeployment orchestrates deployments over a fleet of [MachineSets](./machine-set.yaml).
3+
A MachineDeployment orchestrates deployments over a fleet of [MachineSets](./machine-set.md).
44

55
Its main responsibilities are:
66
* Adopting matching MachineSets not assigned to a MachineDeployment

docs/book/src/developer/architecture/controllers/machine-set.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MachineSet
22

3-
A MachineSet is an immutable abstraction over [Machines](./machine.html).
3+
A MachineSet is an immutable abstraction over [Machines](./machine.md).
44

55
Its main responsibilities are:
66
* Adopting unowned Machines that aren't assigned to a MachineSet

docs/book/src/developer/guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ capi-controller-manager-bf9c6468c-d6msj 1/1 Running 0 2m9s
181181
Cluster API has a number of test suites available for you to run. Please visit the [testing][testing] page for more
182182
information on each suite.
183183

184-
[testing]: ./tests.md
184+
[testing]: ./testing.md
185185

186186
## That's it!
187187

File renamed without changes.

docs/book/src/user/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,5 +1346,5 @@ spec:
13461346
{{#/tabs }}
13471347

13481348
<!-- links -->
1349-
[control-plane-controller]: ../architecture/controllers/control-plane.md
1349+
[control-plane-controller]: ../developer/architecture/controllers/control-plane.md
13501350
[workload cluster]: ../reference/glossary.md#workload-cluster

hack/tools/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ require (
66
github.com/blang/semver v3.5.1+incompatible
77
github.com/go-bindata/go-bindata v3.1.2+incompatible
88
github.com/golangci/golangci-lint v1.23.3
9+
github.com/raviqqe/liche v0.0.0-20200229003944-f57a5d1c5be4
910
golang.org/x/tools v0.0.0-20200102140908-9497f49d5709
1011
k8s.io/code-generator v0.18.0-alpha.2.0.20200130061103-7dfd5e9157ef
1112
sigs.k8s.io/controller-tools v0.2.6-0.20200226180227-d6efdcdd90e2

0 commit comments

Comments
 (0)