beautify docs html befor publishing

This commit is contained in:
Robert Kaussow 2020-06-02 22:23:25 +02:00
parent 5e306a8aae
commit 5ed50835c2
2 changed files with 27 additions and 2 deletions

View File

@ -243,7 +243,7 @@ local PipelineDocs = {
'link-validator -ro', 'link-validator -ro',
], ],
environment: { environment: {
LINK_VALIDATOR_BASE_DIR: 'exampleSite/public', LINK_VALIDATOR_BASE_DIR: 'docs/public',
}, },
}, },
{ {
@ -261,6 +261,18 @@ local PipelineDocs = {
'cd docs/ && hugo-official', 'cd docs/ && hugo-official',
], ],
}, },
{
name: 'beautify',
image: 'node:lts-alpine',
commands: [
'npm install -g js-beautify',
"html-beautify -r -f 'docs/public/**/*.html'",
],
environment: {
FORCE_COLOR: true,
NPM_CONFIG_LOGLEVEL: 'error',
},
},
{ {
name: 'publish', name: 'publish',
image: 'plugins/s3-sync', image: 'plugins/s3-sync',

View File

@ -361,7 +361,7 @@ steps:
commands: commands:
- link-validator -ro - link-validator -ro
environment: environment:
LINK_VALIDATOR_BASE_DIR: exampleSite/public LINK_VALIDATOR_BASE_DIR: docs/public
- name: assets - name: assets
image: byrnedo/alpine-curl image: byrnedo/alpine-curl
@ -374,6 +374,15 @@ steps:
commands: commands:
- cd docs/ && hugo-official - cd docs/ && hugo-official
- name: beautify
image: node:lts-alpine
commands:
- npm install -g js-beautify
- html-beautify -r -f 'docs/public/**/*.html'
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
- name: publish - name: publish
image: plugins/s3-sync image: plugins/s3-sync
settings: settings:
@ -456,4 +465,8 @@ trigger:
depends_on: depends_on:
- docs - docs
---
kind: signature
hmac: af3f94eba4fbf0f057d225eaf237ef36b5631e3121a7d1beb54a1dbb0938caaf
... ...