-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add target for detecting broken links in documentation
- Loading branch information
Showing
3 changed files
with
47 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Setting SHELL to bash allows bash commands to be executed by recipes. | ||
# Options are set to exit when a recipe line exits non-zero or a piped command fails. | ||
SHELL = /usr/bin/env bash -o pipefail | ||
.SHELLFLAGS = -ec | ||
|
||
DOCS_URL ?= http//localhost:1313 | ||
|
||
.PHONY: detect-broken-links | ||
detect-broken-links: | ||
go install github.com/raviqqe/muffet/v2@latest | ||
muffet --rate-limit=3 --max-connections=2 --buffer-size=8192 http://localhost:1313 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Hugo | ||
|
||
## Installing and running Hugo | ||
|
||
When installing hugo install the `extended` edition, you can easily find it on there github page. | ||
We are currently using [0.111.2](https://github.com/gohugoio/hugo/releases/tag/v0.111.2) but it probably works with other versions as well. | ||
|
||
To develop locally you need to also follow the docsy [pre-req](https://github.com/google/docsy#prerequisites). | ||
But in most cases it should work to just run | ||
|
||
```shell | ||
cd hugo | ||
# Install npm dependencies | ||
npm ci | ||
# Download hugo module | ||
hugo mod get | ||
``` | ||
|
||
To look at your changes with hot reload. | ||
|
||
```shell | ||
hugo serve | ||
``` | ||
|
||
## Detecting broken links in documentation | ||
|
||
To detect broken links in documentation using [muffet](https://github.com/raviqqe/muffet): | ||
|
||
1. Make sure that hugo is running and serving documentation as specified in the abbove steps. | ||
2. Run the following command in the hugo directory: | ||
|
||
```shell | ||
make detect-broken-links | ||
``` |