beautify html before uploading the documentation

This commit is contained in:
Robert Kaussow 2020-06-02 19:43:52 +02:00
parent e842ae033d
commit bb0cfc464f
3 changed files with 22 additions and 8 deletions

View File

@ -138,6 +138,15 @@ steps:
commands:
- hugo-official -s exampleSite/
- name: beautify
image: node:lts-alpine
commands:
- npm install -g js-beautify
- html-beautify -r -f 'exampleSite/public/**/*.html'
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
- name: publish
image: plugins/s3-sync
settings:
@ -206,6 +215,6 @@ depends_on:
---
kind: signature
hmac: c9158b4a7c4fb787644c711560925ffae038a982953f958d5f535158f640032f
hmac: 0e4002121787435d22c628f091c8b11ceec1c8a02057436dc9a868c190f91317
...

8
.jsbeautifyrc Normal file
View File

@ -0,0 +1,8 @@
{
"indent_size": 4,
"indent_char": " ",
"preserve_newlines": false,
"unformatted" : ["svg"],
"content_unformatted": ["pre"],
"extra_liners": ["head", "body", "html", "main", "header", "footer", "section"]
}

View File

@ -3,18 +3,15 @@
<meta name="description" content="{{ partial "title" . }}">
<title>{{ partial "title" . }} | {{ .Site.Title -}}</title>
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">
<link rel="stylesheet" href="{{ "main.min.css" | relURL }}" media="screen">
<!-- Theme stylesheet, you can customize css by creating static/custom.css` in your website -->
<link rel="stylesheet" href="{{ "custom.css" | relURL }}" media="screen">
<!-- RSS -->
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ "<!--" | safeHTML }}
Made with Geekdoc theme
https://github.com/xoxys/hugo-geekdoc
{{ "-->" | safeHTML }}
{{ "<!--" | safeHTML -}}
Made with Geekdoc theme https://github.com/xoxys/hugo-geekdoc
{{- "-->" | safeHTML }}