diff --git a/.drone.yml b/.drone.yml
index f1cba01..237b144 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -21,7 +21,7 @@ steps:
image: klakegg/hugo:0.69.0-ext-alpine
commands:
- cd exampleSite/
- - mkdir themes/ && ln -s ../../. themes/hugo-geekdoc && hugo-official
+ - mkdir themes/ && ln -s ../../. themes/hugo-geekdoc && hugo-official -b http://localhost/
- name: spellcheck
image: node:lts-alpine
@@ -44,12 +44,18 @@ steps:
environment:
LINK_VALIDATOR_BASE_DIR: /drone/src/exampleSite/public
+- name: page-validator
+ image: patrickhulce/lhci-client
+ user: root
+ commands:
+ - lhci autorun
+
- name: build
image: alpine
commands:
- mkdir dist/
- echo "${DRONE_TAG:-latest}" > VERSION
- - tar -zcvf dist/hugo-geekdoc.tar.gz . --exclude='.git*' --exclude='.drone*' --exclude='dist' --exclude='.git*' --exclude='example*' --exclude='src' --exclude='gulp*' --exclude='package*' --exclude='node*' --exclude='local*'
+ - tar -zcvf dist/hugo-geekdoc.tar.gz -X .tarignore .
- name: checksum
image: alpine
@@ -162,6 +168,6 @@ depends_on:
---
kind: signature
-hmac: ca1ffdbbe56ee6624fad160c24071dcd3da2de55d580c3614dd0e6a23cdb338a
+hmac: 6c9fc660b81ed9086e1bcb0f8176ba6b084834bc7ecafbaa0573943760698330
...
diff --git a/.gitignore b/.gitignore
index 2af3041..bbfc527 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
# local environments
.swp
.env*
+dist/
node_modules/
exampleSite/themes/
exampleSite/public/
@@ -10,3 +11,6 @@ layouts/partials/icons-svg-symbols.html
static/main.*
static/favicon/
resources/_gen/
+
+# testing
+.lighthouseci/
diff --git a/.lighthouserc.yml b/.lighthouserc.yml
new file mode 100644
index 0000000..10525f6
--- /dev/null
+++ b/.lighthouserc.yml
@@ -0,0 +1,17 @@
+---
+ci:
+ collect:
+ numberOfRuns: 2
+ staticDistDir: exampleSite/public
+ url:
+ - http://localhost/
+ - http://localhost/404.html
+ - http://localhost/posts/
+ settings:
+ chromeFlags: "--no-sandbox"
+ assert:
+ preset: "lighthouse:no-pwa"
+ assertions:
+ uses-long-cache-ttl: off
+ render-blocking-resources: off
+ tap-targets: off
diff --git a/.tarignore b/.tarignore
new file mode 100644
index 0000000..16cdb49
--- /dev/null
+++ b/.tarignore
@@ -0,0 +1,13 @@
+.tarignore
+.dictionary*
+.git*
+.drone*
+.lighthouse*
+.markdownlint*
+example*
+gulp*
+package*
+node*
+local*
+dist
+src
diff --git a/layouts/partials/content.html b/layouts/partials/content.html
index f9d10d7..f7904b6 100644
--- a/layouts/partials/content.html
+++ b/layouts/partials/content.html
@@ -3,9 +3,9 @@
{{ $.Scratch.Set "content" (.Content | replaceRE `` `` | safeHTML) }}
{{ if and $showAnchor $anchorLeft }}
- {{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(