From a1bcb91851d84d3796a8a281af8d01ce0a79a3fc Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 2 Sep 2023 18:27:11 +0200 Subject: Add netlify.toml --- netlify.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 netlify.toml (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..112bf78 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,15 @@ +[build] +publish = "public" +command = "zola build" + +[build.environment] +# Set the version name that you want to use and Netlify will automatically use it. +ZOLA_VERSION = "0.17.2" + +# The magic for deploying previews of branches. +# We need to override the base url with whatever url Netlify assigns to our +# preview site. We do this using the Netlify environment variable +# `$DEPLOY_PRIME_URL`. + +[context.deploy-preview] +command = "zola build --base-url $DEPLOY_PRIME_URL" -- cgit 1.4.1 From edfec31a52c4548100ba845dc16df4c046f59042 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 2 Sep 2023 18:39:05 +0200 Subject: Configure headers for netlify --- netlify.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index 112bf78..422ca3b 100644 --- a/netlify.toml +++ b/netlify.toml @@ -13,3 +13,13 @@ ZOLA_VERSION = "0.17.2" [context.deploy-preview] command = "zola build --base-url $DEPLOY_PRIME_URL" + +[[headers]] + for = "/*" + [headers.values] + X-Frame-Options = "DENY" + X-Content-Type-Options = "nosniff" + X-XSS-Protection = "1; mode=block" + Referrer-Policy = "strict-origin-when-cross-origin" + Strict-Transport-Security = "max-age=63072000; includeSubdomains" + Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'unsafe-inline'; frame-ancestors 'none'" -- cgit 1.4.1 From 093ac10f7e5c9bd40e9def573c654069e4cba1a9 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 9 Sep 2023 18:19:29 +0200 Subject: Add form-action and base-uri CSPs --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index 422ca3b..b75399f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -22,4 +22,4 @@ command = "zola build --base-url $DEPLOY_PRIME_URL" X-XSS-Protection = "1; mode=block" Referrer-Policy = "strict-origin-when-cross-origin" Strict-Transport-Security = "max-age=63072000; includeSubdomains" - Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'unsafe-inline'; frame-ancestors 'none'" + Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'unsafe-inline'; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" -- cgit 1.4.1 From d10630da50a2b0e005ef0499190cc5cc898f0b06 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 9 Sep 2023 19:11:07 +0200 Subject: Hash inline style in CSP openssl dgst -sha256 -binary < templates/style.html | openssl enc -base64 2Sbht7dvdhJX00j84akXy9AejYUf6sOM3OpwMxNiDXQ= --- netlify.toml | 2 +- templates/style.css.html | 169 ++++++++++++++++++++++++++++++++++++++++++++++ templates/style.html | 172 ----------------------------------------------- 3 files changed, 170 insertions(+), 173 deletions(-) create mode 100644 templates/style.css.html delete mode 100644 templates/style.html (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index b75399f..6be8468 100644 --- a/netlify.toml +++ b/netlify.toml @@ -22,4 +22,4 @@ command = "zola build --base-url $DEPLOY_PRIME_URL" X-XSS-Protection = "1; mode=block" Referrer-Policy = "strict-origin-when-cross-origin" Strict-Transport-Security = "max-age=63072000; includeSubdomains" - Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'unsafe-inline'; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" + Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-2Sbht7dvdhJX00j84akXy9AejYUf6sOM3OpwMxNiDXQ='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" diff --git a/templates/style.css.html b/templates/style.css.html new file mode 100644 index 0000000..00b4131 --- /dev/null +++ b/templates/style.css.html @@ -0,0 +1,169 @@ + body { + font-family: Verdana, sans-serif; + margin: auto; + padding: 20px; + max-width: 720px; + text-align: left; + background-color: #fff; + word-wrap: break-word; + overflow-wrap: break-word; + line-height: 1.5; + color: #444; + } + + h1, + h2, + h3, + h4, + h5, + h6, + strong, + b { + color: #222; + } + + a { + color: #3273dc; + } + + .title { + text-decoration: none; + border: 0; + } + + .title span { + font-weight: 400; + } + + nav a { + margin-right: 10px; + } + + textarea { + width: 100%; + font-size: 1rem; + } + + input { + font-size: 1rem; + } + + main,article { + line-height: 1.6; + } + + table { + width: 100%; + } + + img { + max-width: 100%; + } + + code { + padding: 2px 5px; + background-color: #f2f2f2; + } + + pre code { + color: #222; + display: block; + padding: 20px; + white-space: pre-wrap; + font-size: 0.875rem; + overflow-x: auto; + } + + div.highlight pre { + background-color: initial; + color: initial; + } + + div.highlight code { + background-color: unset; + color: unset; + } + + blockquote { + border-left: 1px solid #999; + color: #222; + padding-left: 20px; + font-style: italic; + } + + footer { + padding: 25px; + text-align: center; + } + + .helptext { + color: #777; + font-size: small; + } + + .errorlist { + color: #eba613; + font-size: small; + } + + /* blog posts */ + ul.blog-posts { + list-style-type: none; + padding: unset; + } + + ul.blog-posts li { + display: flex; + } + + ul.blog-posts li span { + flex: 0 0 130px; + } + + ul.blog-posts li a:visited { + color: #8b6fcb; + } + + @media (prefers-color-scheme: dark) { + body { + background-color: #333; + color: #ddd; + } + + h1, + h2, + h3, + h4, + h5, + h6, + strong, + b { + color: #eee; + } + + a { + color: #8cc2dd; + } + + code { + background-color: #777; + } + + pre code { + color: #ddd; + } + + blockquote { + color: #ccc; + } + + textarea, + input { + background-color: #252525; + color: #ddd; + } + + .helptext { + color: #aaa; + } + } diff --git a/templates/style.html b/templates/style.html deleted file mode 100644 index 4744695..0000000 --- a/templates/style.html +++ /dev/null @@ -1,172 +0,0 @@ - -- cgit 1.4.1 From 69c601b5ebd3d386e9a4256d4e285ae8f5b0c80a Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 13 Feb 2024 17:46:36 +0100 Subject: Update Netlify style SHA hash --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index 6be8468..59e0094 100644 --- a/netlify.toml +++ b/netlify.toml @@ -22,4 +22,4 @@ command = "zola build --base-url $DEPLOY_PRIME_URL" X-XSS-Protection = "1; mode=block" Referrer-Policy = "strict-origin-when-cross-origin" Strict-Transport-Security = "max-age=63072000; includeSubdomains" - Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-2Sbht7dvdhJX00j84akXy9AejYUf6sOM3OpwMxNiDXQ='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" + Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-PfqYdfojK4X5lEpBXpUr/pJgf8BZ0tVvD+shnG3tM/E='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" -- cgit 1.4.1 From 62014d65b9693908189fd7c73a5dc1062113a72c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 18 Feb 2024 17:30:09 +0100 Subject: Update netlify style-src hash --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index 59e0094..dc69016 100644 --- a/netlify.toml +++ b/netlify.toml @@ -22,4 +22,4 @@ command = "zola build --base-url $DEPLOY_PRIME_URL" X-XSS-Protection = "1; mode=block" Referrer-Policy = "strict-origin-when-cross-origin" Strict-Transport-Security = "max-age=63072000; includeSubdomains" - Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-PfqYdfojK4X5lEpBXpUr/pJgf8BZ0tVvD+shnG3tM/E='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" + Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-5K5tkbXKXWE7Xcs3HIt98Y+XOWAAsdSyGzixGECKPcA='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" -- cgit 1.4.1 From 742bb471ba6c6cddc7e2de8781bacabbc86369e7 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 17 Mar 2024 15:16:10 +0100 Subject: Reformat CSS --- netlify.toml | 2 +- templates/style.css.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index dc69016..26d163f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -22,4 +22,4 @@ command = "zola build --base-url $DEPLOY_PRIME_URL" X-XSS-Protection = "1; mode=block" Referrer-Policy = "strict-origin-when-cross-origin" Strict-Transport-Security = "max-age=63072000; includeSubdomains" - Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-5K5tkbXKXWE7Xcs3HIt98Y+XOWAAsdSyGzixGECKPcA='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" + Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-8V+sSVjbj+U897SSFG8AIOvquoI2drTloxs2lLwHCEw='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" diff --git a/templates/style.css.html b/templates/style.css.html index 1cd23b6..716880d 100644 --- a/templates/style.css.html +++ b/templates/style.css.html @@ -48,8 +48,8 @@ } nav active { - font-weight: bold; - margin-right: 10px; + font-weight: bold; + margin-right: 10px; } textarea { -- cgit 1.4.1 From 709ee0253b443933df8e2acc3b884245bdb2c40e Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 17 Mar 2024 15:22:30 +0100 Subject: Fix CSS SHA --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index 26d163f..2b214b1 100644 --- a/netlify.toml +++ b/netlify.toml @@ -22,4 +22,4 @@ command = "zola build --base-url $DEPLOY_PRIME_URL" X-XSS-Protection = "1; mode=block" Referrer-Policy = "strict-origin-when-cross-origin" Strict-Transport-Security = "max-age=63072000; includeSubdomains" - Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-8V+sSVjbj+U897SSFG8AIOvquoI2drTloxs2lLwHCEw='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" + Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-31p21SuRVVuYOWghmuvw19ydYUi/EQ/ok1qzTSKO7FQ='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" -- cgit 1.4.1 From 51f60c9e5a8b5dadf740e9f234d5235ae41db218 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 17 Mar 2024 15:44:32 +0100 Subject: Update CSS SHA --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index 2b214b1..90422c9 100644 --- a/netlify.toml +++ b/netlify.toml @@ -22,4 +22,4 @@ command = "zola build --base-url $DEPLOY_PRIME_URL" X-XSS-Protection = "1; mode=block" Referrer-Policy = "strict-origin-when-cross-origin" Strict-Transport-Security = "max-age=63072000; includeSubdomains" - Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-31p21SuRVVuYOWghmuvw19ydYUi/EQ/ok1qzTSKO7FQ='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" + Content-Security-Policy = "default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'sha256-iJQfPEEzY1fjDE/sJElXzaTdtJI+vxkKM//fXwJj/cI='; form-action 'none'; base-uri 'self'; frame-ancestors 'none'" -- cgit 1.4.1 From 2c9ca00042ec7c1a4da5ad927f19e8849e5ae96c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 12 May 2024 16:46:48 +0200 Subject: Fix links in netlify branch deployments --- netlify.toml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index 90422c9..91f23c5 100644 --- a/netlify.toml +++ b/netlify.toml @@ -13,6 +13,8 @@ ZOLA_VERSION = "0.17.2" [context.deploy-preview] command = "zola build --base-url $DEPLOY_PRIME_URL" +[context.branch-deploy] +command = "zola build --base-url $DEPLOY_PRIME_URL" [[headers]] for = "/*" -- cgit 1.4.1