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

minify any supported output format (HTML, XML etc.) #15

Merged
merged 3 commits into from
Aug 6, 2022
Merged
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
3 changes: 3 additions & 0 deletions exampleSite/config/_default/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ googleAnalytics: ''
minify:
# Do not minify XML files to avoid CDATA escape issues
disableXML: true
tdewolff:
html:
keepQuotes: true

outputs:
home: [HTML, Atom, FEED, JSONFEED, JSON, MANIFEST, humanstxt]
Expand Down
7 changes: 3 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# here but we recommend using the Netlify UI for sensitive
# values to keep them out of your source repository.
[context.production]
command = 'hugo --source=exampleSite --baseURL ${URL} --destination ../public'
command = 'hugo --source=exampleSite --baseURL ${URL} --destination ../public --minify'

[context.production.environment]
HUGO_ENV = 'production'
Expand All @@ -27,7 +27,7 @@
# Deploy Preview context: all deploys generated from
# a pull/merge request will inherit these settings.
[context.deploy-preview]
command = 'go run netlify-pr.go; hugo --source=exampleSite --buildDrafts --buildFuture --baseURL ${DEPLOY_PRIME_URL} --destination ../public'
command = 'go run netlify-pr.go; hugo --source=exampleSite --buildDrafts --buildFuture --baseURL ${DEPLOY_PRIME_URL} --destination ../public --minify'

[context.deploy-preview.environment]
HUGO_ENV = 'development'
Expand Down Expand Up @@ -79,8 +79,7 @@
magnetometer=(),
microphone=(),
payment=(),
usb=(),
interest-cohort=()'''
usb=()'''
# CSP makes it possible for server administrators to reduce or eliminate
# the vectors by which XSS can occur by specifying the domains that the
# browser should consider to be valid sources of executable scripts.
Expand Down