Skip to content

Commit 36cb49f

Browse files
swltrmartingr
andcommitted
Add CI job to check hyperlinks in documentation
Co-authored-by: Martin Grzenia <martin.grzenia@iml.fraunhofer.de> Merged-by: Martin Grzenia <martin.grzenia@iml.fraunhofer.de>
1 parent 6c9d5fb commit 36cb49f

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

.gitlab-ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ workflow:
1818
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
1919
- if: $CI_PIPELINE_SOURCE == "schedule"
2020
- if: $CI_PIPELINE_SOURCE == "web"
21-
21+
2222
variables:
2323
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
2424
DO_BUILD_CODEQUALITY_IMAGE:
@@ -100,6 +100,7 @@ build:
100100
- opentcs-*/build/libs/
101101
- opentcs-*/build/resources/
102102
- opentcs-*/build/tmp/
103+
- opentcs-documentation/build/install/
103104
exclude:
104105
- .gradle/.tmp/**/*
105106
- .gradle/caches/**/*
@@ -184,6 +185,18 @@ lint-checkstyle:
184185
paths:
185186
- .gradle
186187

188+
lint-hyperlinks:
189+
stage: test
190+
interruptible: true
191+
image:
192+
name: ghcr.io/untitaker/hyperlink:0.2.0
193+
entrypoint: [""]
194+
dependencies:
195+
- build
196+
script:
197+
- echo "Checking hyperlinks in generated documentation..."
198+
- hyperlink --check-anchors opentcs-documentation/build/install/
199+
187200
lint-reuse:
188201
stage: test
189202
interruptible: true

opentcs-documentation/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ task asciidoctorReleaseNotes(type: org.asciidoctor.gradle.jvm.AsciidoctorTask) {
152152
// Attributes specific to the HTML output
153153
attributes 'webfonts': false, // Disable webfonts
154154
'iconfont-remote': false, // Disable remote icon fonts
155+
'stylesdir': "_assets/css/", // Override the default styles directory to properly configure the use of local Font Awsome assets
155156
'docinfo': "${file('src/docs/release-notes/docinfo.html')}, shared" // The docinfo file references the stylesheets for fonts to use
156-
157157
}
158158

159159
task asciidoctorUsersGuide(type: org.asciidoctor.gradle.jvm.AsciidoctorTask) {
@@ -178,6 +178,7 @@ task asciidoctorUsersGuide(type: org.asciidoctor.gradle.jvm.AsciidoctorTask) {
178178
// Attributes specific to the HTML output
179179
'webfonts': false, // Disable webfonts
180180
'iconfont-remote': false, // Disable remote icon fonts
181+
'stylesdir': "../_assets/css/", // Override the default styles directory to properly configure the use of local Font Awsome assets
181182
'docinfo': "${file('src/docs/users-guide/docinfo.html')}, shared" // The docinfo file references the stylesheets for fonts to use
182183

183184
resources {
@@ -217,10 +218,9 @@ task asciidoctorDevelopersGuide(type: org.asciidoctor.gradle.jvm.AsciidoctorTask
217218
// Attributes specific to the HTML output
218219
'webfonts': false, // Disable webfonts
219220
'iconfont-remote': false, // Disable remote icon fonts
221+
'stylesdir': "../../_assets/css/", // Override the default styles directory to properly configure the use of local Font Awsome assets
220222
'docinfo': "${file('src/docs/developers-guide/docinfo.html')}, shared" // The docinfo file references the stylesheets for fonts to use
221223

222-
// 'docinfo': "${file('src/docs/docinfo.html')}, shared", // doesn't seem to work
223-
//'docinfodir': file('src/docs'),
224224
resources {
225225
from(sourceDir) {
226226
include '**/*.png'

opentcs-documentation/src/docs/developers-guide/docinfo.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
-->
55

66
<link rel="stylesheet" href="../../_assets/css/style.css">
7-
<link rel="stylesheet" href="../../_assets/css/font-awesome.css">

opentcs-documentation/src/docs/release-notes/docinfo.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
-->
55

66
<link rel="stylesheet" href="_assets/css/style.css">
7-
<link rel="stylesheet" href="_assets/css/font-awesome.css">

opentcs-documentation/src/docs/users-guide/docinfo.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
-->
55

66
<link rel="stylesheet" href="../_assets/css/style.css">
7-
<link rel="stylesheet" href="../_assets/css/font-awesome.css">

0 commit comments

Comments
 (0)