Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SITE] move to hugo builtin minify #14592

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,7 @@ jobs:
# extended: true

- name: Build Hugo
run: hugo -v

- uses: actions/setup-node@v3
name: Setup Node
with:
node-version: ${{ env.NODE_VERSION }}

- run: npm ci
name: Run npm ci

- name: Test through minifying
run: gulp min-html
run: hugo --environment=production --minify --templateMetrics --logLevel info

# test-windows:
# needs: lint
Expand Down
39 changes: 39 additions & 0 deletions config/_default/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,42 @@ params:
Linkedin: http://www.linkedin.com/groups?home=&gid=2445279
Groups: http://groups.google.com/group/devopsdays
GoogleMapsAPI: AIzaSyA1WhgJirbPSYxMCWRD14IP90A4yLY4vxE

minify:
disableCSS: false
disableHTML: false
disableJS: false
disableJSON: false
disableSVG: false
disableXML: false
minifyOutput: true
tdewolff:
css:
inline: true
keepCSS2: true
precision: 0
html:
keepComments: false
keepConditionalComments: false
keepDefaultAttrVals: true
keepDocumentTags: true
keepEndTags: true
keepQuotes: false
keepSpecialComments: false
keepWhitespace: false
templateDelims:
- ""
- ""
js:
keepVarNames: false
precision: 0
version: 2022
json:
keepNumbers: false
precision: 0
svg:
inline: false
keepComments: false
precision: 0
xml:
keepWhitespace: false
2 changes: 2 additions & 0 deletions content/events/2019-geneva/newsletter.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Description = "Newsletter devopsdays Geneva 2018"

Subscribe to our newsletter for the next news !

{{< rawhtml >}}
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">\
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif;}
Expand All @@ -28,3 +29,4 @@ Subscribe to our newsletter for the next news !
</form>
</div>
<script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script><script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';fnames[3]='ADDRESS';ftypes[3]='address';fnames[4]='PHONE';ftypes[4]='phone';fnames[5]='BIRTHDAY';ftypes[5]='birthday';\}(jQuery));var $mcj = jQuery.noConflict(true);</script>
{{< /rawhtml >}}
2 changes: 2 additions & 0 deletions content/events/2023-detroit/welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ Description = "devopsdays Detroit 2023"
</div>
</form>
</div>
{{< rawhtml >}}
<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js"></script><script type="text/javascript">(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]=EMAIL;ftypes[0]=merge;,fnames[1]=FNAME;ftypes[1]=merge;,fnames[2]=LNAME;ftypes[2]=merge;,fnames[3]=ADDRESS;ftypes[3]=merge;,fnames[4]=PHONE;ftypes[4]=merge;false}(jQuery));var $mcj = jQuery.noConflict(true);</script></div>
{{< /rawhtml >}}

<hr/>

Expand Down

This file was deleted.

2 changes: 2 additions & 0 deletions themes/devopsdays-theme/layouts/shortcodes/rawhtml.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- raw html -->
{{ .Inner | safeHTML | safeJS }}
Loading