Add link checker and fix links

Signed-off-by: lucperkins <lucperkins@gmail.com>
This commit is contained in:
lucperkins 2020-02-27 16:07:52 -08:00
parent 64a77ad8e5
commit 0fa3a5346e
13 changed files with 43 additions and 20 deletions

4
.gitignore vendored
View File

@ -7,3 +7,7 @@ node_modules/
# Hugo-generated assets
public/
resources/
# Link checker assets
bin/
tmp/

5
.htmltest.yml Normal file
View File

@ -0,0 +1,5 @@
DirectoryPath: public
IgnoreDirectoryMissingTrailingSlash: true
CheckExternal: false
IgnoreAltMissing: true
IgnoreInternalEmptyHash: true

View File

@ -1,3 +1,6 @@
clean:
rm -rf public resources
serve:
hugo server \
--buildDrafts \
@ -5,10 +8,21 @@ serve:
--disableFastRender
production-build:
hugo
hugo \
--minify
make check-links
preview-build:
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture
install-link-checker:
curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash
run-link-checker:
bin/htmltest
check-links: install-link-checker run-link-checker

View File

@ -10,8 +10,8 @@
{{- $fontAwesomeUrl := printf "https://use.fontawesome.com/releases/v%s/css/all.css" $fontAwesomeVersion }}
@charset "utf-8"
@import url({{ $fontsUrl }})
@import url({{ $fontAwesomeUrl }})
@import url("{{ $fontsUrl }}")
@import url("{{ $fontAwesomeUrl }}")
// Project-specific colors and variables
$twitter-blue: #1da1f2

View File

@ -173,7 +173,7 @@ containerd versions:
| Component | Status | Stabilized Version | Links |
|------------------|----------|--------------------|---------------|
| GRPC API | Stable | 1.0 | [api/](api) |
| GRPC API | Stable | 1.0 | [gRPC API](#grpc) |
| Metrics API | Stable | 1.0 | - |
| Runtime Shim API | Stable | 1.2 | - |
| Daemon Config | Stable | 1.0 | - |
@ -188,7 +188,7 @@ Unless explicitly stated here, components that are called out as unstable or
not covered may change in a future minor version. Breaking changes to
"unstable" components will be avoided in patch versions.
### GRPC API
### GRPC API {#grpc}
The primary product of containerd is the GRPC API. As of the 1.0.0 release, the
GRPC API will not have any backwards incompatible changes without a _major_
@ -197,7 +197,7 @@ version jump.
To ensure compatibility, we have collected the entire GRPC API symbol set into
a single file. At each _minor_ release of containerd, we will move the current
`next.pb.txt` file to a file named for the minor version, such as `1.0.pb.txt`,
enumerating the support services and messages. See [api/](api) for details.
enumerating the support services and messages.
Note that new services may be added in _minor_ releases. New service methods
and new fields on messages may be added if they are optional.

View File

@ -7,7 +7,7 @@ containerd docs &ndash; {{ .Title }}
{{- $pages := where .Site.Pages "Section" $section }}
{{ partial "hero.html" . }}
{{ partial "docs/tabs.html" (dict "pages" $pages "currentUrl" .URL) }}
{{ partial "docs/tabs.html" (dict "pages" $pages "currentUrl" .RelPermalink) }}
<article class="is-{{ $section }}-article">
<div class="container">

View File

@ -7,7 +7,7 @@ containerd docs &ndash; {{ .Title }}
{{- $pages := where .Site.Pages "Section" "docs" }}
{{ partial "hero.html" . }}
{{ partial "docs/tabs.html" (dict "pages" $pages "currentUrl" .URL) }}
{{ partial "docs/tabs.html" (dict "pages" $pages "currentUrl" .RelPermalink) }}
<article class="is-{{ $section }}-article">
<div class="container">

View File

@ -1,4 +1,4 @@
{{- $currentUrl := .URL }}
{{- $currentUrl := .RelPermalink }}
{{- $docs := where .Site.Pages "Section" "docs" }}
<div class="dropdown">
<div class="dropdown-trigger">
@ -12,8 +12,8 @@
<div class="dropdown-menu" id="docs-dropdown-menu" role="menu">
<div class="dropdown-content">
{{- range $docs }}
{{- $isCurrentPage := eq $currentUrl .URL }}
<a class="dropdown-item{{ if $isCurrentPage }} is-active{{ end }}" href="{{ .URL }}">
{{- $isCurrentPage := eq $currentUrl .RelPermalink }}
<a class="dropdown-item{{ if $isCurrentPage }} is-active{{ end }}" href="{{ .RelPermalink }}">
{{ .Title }}
</a>
{{- end }}

View File

@ -5,9 +5,9 @@
<ul>
{{- range $pages }}
{{- $title := cond (isset .Params "short") .Params.short .Title }}
{{- $isCurrentPage := eq $currentUrl .URL }}
{{- $isCurrentPage := eq $currentUrl .RelPermalink }}
<li{{ if $isCurrentPage }} class="is-active"{{ end }}>
<a href="{{ .URL }}">
<a href="{{ .RelPermalink }}">
{{ $title }}
</a>
</li>

View File

@ -24,7 +24,7 @@
<ul>
{{- range $docs }}
<li>
<a href="{{ .URL }}">
<a href="{{ .RelPermalink }}">
{{ .Title }}
</a>
</li>
@ -48,7 +48,7 @@
{{- range $projectPages }}
<li>
<a href="{{ .URL }}">
<a href="{{ .RelPermalink }}">
{{ .Title }}
</a>
</li>

View File

@ -35,6 +35,6 @@
<meta name="twitter:site" content="@{{ $twitterHandle }}">
<meta name="twitter:creator" content="@{{ $twitterHandle }}">
<link rel="canonical" content="{{ .Permalink }}">
<link rel="canonical" href="{{ .Permalink }}">
<link rel="shortcut icon" href="/favicon.png" type="image/png">
{{ .Hugo.Generator }}
{{ hugo.Generator }}

View File

@ -40,7 +40,7 @@
<div class="navbar-dropdown is-right">
{{- range $docs }}
<a class="navbar-item" href="{{ .URL }}">
<a class="navbar-item" href="{{ .RelPermalink }}">
{{ .Title }}
</a>
{{- end }}
@ -58,7 +58,7 @@
</a>
{{- range $projectPages }}
<a class="navbar-item" href="{{ .URL }}">
<a class="navbar-item" href="{{ .RelPermalink }}">
{{ .Title }}
</a>
{{- end }}

View File

@ -3,7 +3,7 @@ publish = "public"
command = "make production-build"
[build.environment]
HUGO_VERSION = "0.49"
HUGO_VERSION = "0.65.3"
[context.deploy-preview]
command = "make preview-build"