mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 06:58:28 -04:00
172 lines
5.3 KiB
TOML
172 lines
5.3 KiB
TOML
[build]
|
|
command = "yarn build"
|
|
publish = "public"
|
|
|
|
[build.environment]
|
|
NODE_VERSION = "12.16.1"
|
|
YARN_VERSION = "1.22.0"
|
|
YARN_FLAGS = "--no-ignore-optional --frozen-lockfile"
|
|
|
|
# Ensure *only* Pretty URLs are enabled, even though this is already set up in
|
|
# the Netlify dashboard.
|
|
[build.processing]
|
|
skip_processing = false
|
|
[build.processing.css]
|
|
bundle = false
|
|
minify = false
|
|
[build.processing.js]
|
|
bundle = false
|
|
minify = false
|
|
[build.processing.html]
|
|
pretty_urls = true
|
|
[build.processing.images]
|
|
compress = false
|
|
|
|
[context.deploy-preview]
|
|
command = "yarn build:preview"
|
|
|
|
[context.branch-deploy]
|
|
command = "yarn build:preview"
|
|
|
|
|
|
# The most important headers and redirects are specified in the _headers and
|
|
# _redirects files generated by Hugo. These are additional custom rules.
|
|
|
|
# Custom security headers
|
|
[[headers]]
|
|
for = "/*"
|
|
[headers.values]
|
|
# Report-To = "{\"group\":\"default\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://jarvis.report-uri.com/a/d/g\"}]}"
|
|
# NEL = "{\"report_to\":\"default\",\"max_age\":604800}"
|
|
# Content-Security-Policy = "default-src 'none'; script-src 'self' platform.twitter.com syndication.twitter.com cdn.syndication.twimg.com buttons.github.io assets.codepen.io production-assets.codepen.io; style-src 'self' 'unsafe-inline' fonts.googleapis.com platform.twitter.com assets-cdn.github.com github.githubassets.com; img-src 'self' data: https:; font-src 'self' fonts.gstatic.com; form-action 'self'; child-src 'self' www.youtube.com www.youtube-nocookie.com twitter.com syndication.twitter.com platform.twitter.com codepen.io cdpn.io; frame-src 'self'; frame-ancestors 'self'; base-uri 'none'; object-src 'self'; worker-src 'none'; connect-src 'self' jarvis.report-uri.com syndication.twitter.com api.github.com; upgrade-insecure-requests; report-uri https://jarvis.report-uri.com/r/d/csp/enforce; report-to default"
|
|
# Feature-Policy = "accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; sync-xhr 'none'; payment 'none'; usb 'none'; vr 'none'"
|
|
X-XSS-Protection = "1; mode=block"
|
|
# X-XSS-Protection = "1; mode=block; report=https://jarvis.report-uri.com/r/d/xss/enforce"
|
|
X-Pingback = "https://jarv.is/ping/xmlrpc"
|
|
X-Got-Milk = "2%"
|
|
X-View-Source = "https://github.com/jakejarvis/jarv.is"
|
|
|
|
# PGP file: open in browser, download correctly
|
|
[[headers]]
|
|
for = "/jarvis.asc"
|
|
[headers.values]
|
|
Cache-Control = "max-age=0, no-cache, no-store"
|
|
Content-Type = "text/plain; charset=UTF-8"
|
|
Content-Disposition = "inline; filename=\"jarvis.asc\""
|
|
|
|
# AMP cache invalidation key requirements
|
|
# https://developers.google.com/amp/cache/update-cache#update-cache-guidelines
|
|
[[headers]]
|
|
for = "/.well-known/amphtml/apikey.pub"
|
|
[headers.values]
|
|
Content-Type = "text/plain; charset=UTF-8"
|
|
|
|
# Redirect Netlify and www subdomains to primary domain:
|
|
[[redirects]]
|
|
from = "https://jakejarvis.netlify.com/*"
|
|
to = "https://jarv.is/:splat"
|
|
status = 301
|
|
force = true
|
|
[[redirects]]
|
|
from = "https://www.jarv.is/*"
|
|
to = "https://jarv.is/:splat"
|
|
status = 301
|
|
force = true
|
|
|
|
# Support ancient RSS subscriptions and links from WordPress era:
|
|
[[redirects]]
|
|
from = "/feed"
|
|
to = "/feed.xml"
|
|
status = 301
|
|
[[redirects]]
|
|
from = "/rss"
|
|
to = "/feed.xml"
|
|
status = 301
|
|
[[redirects]]
|
|
from = "/index.xml"
|
|
to = "/feed.xml"
|
|
status = 301
|
|
[[redirects]]
|
|
from = "/index.php*"
|
|
to = "/"
|
|
status = 301
|
|
[[redirects]]
|
|
from = "/blog/*"
|
|
to = "/notes/"
|
|
status = 301
|
|
[[redirects]]
|
|
from = "/archives/*"
|
|
to = "/notes/"
|
|
status = 301
|
|
|
|
# Proxy these directories from elsewhere to mimic GitHub Pages behavior and
|
|
# keep this main repository squeaky clean.
|
|
# https://github.com/jakejarvis/random-sites
|
|
[[redirects]]
|
|
from = "/y2k/*"
|
|
to = "https://modest-jackson-d5516b.netlify.com/y2k/:splat"
|
|
status = 200
|
|
[[redirects]]
|
|
from = "/ios-trackers/*"
|
|
to = "https://modest-jackson-d5516b.netlify.com/ios-trackers/:splat"
|
|
status = 200
|
|
[[redirects]]
|
|
from = "/scrabble/*"
|
|
to = "https://modest-jackson-d5516b.netlify.com/scrabble/:splat"
|
|
status = 200
|
|
[[redirects]]
|
|
from = "/comp20/*"
|
|
to = "https://modest-jackson-d5516b.netlify.com/comp20/:splat"
|
|
status = 200
|
|
[[redirects]]
|
|
from = "/candies/*"
|
|
to = "https://modest-jackson-d5516b.netlify.com/candies/:splat"
|
|
status = 200
|
|
[[redirects]]
|
|
from = "/awesome/*"
|
|
to = "https://modest-jackson-d5516b.netlify.com/awesome/:splat"
|
|
status = 200
|
|
|
|
# More miscellaneous mirrors:
|
|
[[redirects]]
|
|
from = "/apple-touch-icon-precomposed.png"
|
|
to = "/apple-touch-icon.png"
|
|
status = 200
|
|
[[redirects]]
|
|
from = "/me_lg.jpg"
|
|
to = "/me_large.jpg"
|
|
status = 200
|
|
|
|
# Send pingbacks to https://webmention.io
|
|
[[redirects]]
|
|
from = "/xmlrpc.php"
|
|
to = "https://webmention.io/jarv.is/xmlrpc"
|
|
status = 200
|
|
[[redirects]]
|
|
from = "/ping/*"
|
|
to = "https://webmention.io/jarv.is/:splat"
|
|
status = 200
|
|
# fixes manual form submission
|
|
[[redirects]]
|
|
from = "/jarv.is/webmention"
|
|
to = "https://webmention.io/jarv.is/webmention"
|
|
status = 200
|
|
|
|
# H A C K E R M A N ( ͡° ͜ʖ ͡°)
|
|
[[redirects]]
|
|
from = "*/wp-login.php"
|
|
to = "/403.html"
|
|
status = 403
|
|
[[redirects]]
|
|
from = "*/wp-admin/*"
|
|
to = "/403.html"
|
|
status = 403
|
|
[[redirects]]
|
|
from = "/login"
|
|
to = "/403.html"
|
|
status = 403
|
|
[[redirects]]
|
|
from = "*/login.php"
|
|
to = "/403.html"
|
|
status = 403
|