From 23c9e719a2ea7be334986e45ff809f63d334f983 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Sun, 29 Apr 2018 11:08:33 -0400 Subject: [PATCH] Update doc site theme Also: - Update font files to a much lighter subset versions - Add headers --- doc/config.toml | 2 +- doc/static/_headers | 51 ++++++++++++++++++++++++++++++++++++++ doc/themes/hugo-onyx-theme | 2 +- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 doc/static/_headers diff --git a/doc/config.toml b/doc/config.toml index 6459527..a70ea73 100644 --- a/doc/config.toml +++ b/doc/config.toml @@ -74,7 +74,7 @@ disableFastRender = true # Hugo 0.30 , "css/style.css" ] custom_css_absolute = [ # Iosevka fonts - "https://cdn.rawgit.com/kaushalmodi/iosevka-mirror/v1.13.2/iosevka.css" + "https://cdn.rawgit.com/kaushalmodi/iosevka-mirror/v1.14.1/iosevka.css" ] custom_js = [] diff --git a/doc/static/_headers b/doc/static/_headers new file mode 100644 index 0000000..c9ee40a --- /dev/null +++ b/doc/static/_headers @@ -0,0 +1,51 @@ +# Paste the below in https://play.netlify.com/headers to test +# Set max-age to 1 year for stuff not expected to update any time soon. +/css/* + Cache-Control: public, max-age=31536000 + +/js/* + Cache-Control: public, max-age=31536000 + +/fonts/* + Cache-Control: public, max-age=31536000 + +# Favicons +/favicon.* + Cache-Control: public, max-age=31536000 +/favicon-*.png + Cache-Control: public, max-age=31536000 +/mstile-*.png + Cache-Control: public, max-age=31536000 +/apple-touch-icon.png + Cache-Control: public, max-age=31536000 +/manifest.json + Cache-Control: public, max-age=31536000 + +# Also these images used by the refined theme won't be updated frequently. +/images/* + Cache-Control: public, max-age=31536000 + +# https://webbkoll.dataskydd.net/en/results?url=https%3A%2F%2Fscripter.co%2F +# Security Headers: https://securityheaders.com/?q=https%3A%2F%2Fscripter.co&followRedirects=on + +## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy +/* + Referrer-Policy: same-origin + +## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options +# I never intend to show any of the pages on my site in a on my site or +# elsewhere. +/* + X-Frame-Options: DENY + +## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection +/* + X-Xss-Protection: 1; mode=block + +## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options +/* + X-Content-Type-Options: nosniff + +# Content Security Policy +/* + Content-Security-Policy-Report-Only: default-src 'none'; script-src 'self' 'sha256-Zgc2pp+yOmAVogxvTHYBMFKubY0HKk2a0+0+8sX17WY=' https://cdnjs.cloudflare.com/ajax/libs/mathjax/ 'unsafe-inline'; object-src 'none'; style-src 'self' 'unsafe-inline'; img-src 'self' https://*.cloudfront.net https://*.travis-ci.org/kaushalmodi/; font-src 'self' about: data: https://cdnjs.cloudflare.com/ajax/libs/mathjax/ https://cdn.rawgit.com/kaushalmodi/iosevka-mirror/; connect-src 'self'; manifest-src 'self'; media-src 'none'; frame-src 'none'; form-action 'self'; frame-ancestors 'none'; base-uri 'self'; block-all-mixed-content; report-uri https://c571407e2c6d71ed2021633b7fdad0de.report-uri.com/r/d/csp/enforce; diff --git a/doc/themes/hugo-onyx-theme b/doc/themes/hugo-onyx-theme index c55002e..bfe37f9 160000 --- a/doc/themes/hugo-onyx-theme +++ b/doc/themes/hugo-onyx-theme @@ -1 +1 @@ -Subproject commit c55002e42b25e2ee8f843bb509bc8cc7046b9e9f +Subproject commit bfe37f9c9f7281a011c05caccfbb8aa0e4c1276c