1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 17:50:29 -04:00
jarv.is/netlify.toml
Jake Jarvis 17501e8c34
add simple license and privacy policy pages
silly but certain things require these. also added some sitemap priorities to other miscellaneous pages.
2020-04-28 18:53:15 -04:00

243 lines
5.6 KiB
TOML

[build]
command = "yarn build"
publish = "public"
[build.environment]
YARN_VERSION = "1.22.4"
YARN_FLAGS = "--no-ignore-optional --frozen-lockfile"
GO_VERSION = "1.14.2"
# 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"
# https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#netlifytoml-dev-block
[dev]
command = "yarn start --baseURL / --appendPort=false"
port = 1338
targetPort = 1337
publish = "public"
autoLaunch = false
# The most important headers and redirects are specified in the _headers and
# _redirects files generated by Hugo. These are additional custom rules.
# Universal headers
[[headers]]
for = "/*"
[headers.values]
# 🐄
X-Got-Milk = "2%"
# 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://jakejarvis.netlify.app/*"
to = "https://jarv.is/:splat"
status = 301
force = true
[[redirects]]
from = "https://www.jarv.is/*"
to = "https://jarv.is/:splat"
status = 301
force = true
# Proxy data to Simple Analytics endpoint
[[redirects]]
from = "/sa/send.gif*"
to = "https://queue.simpleanalyticscdn.com/simple.gif:splat"
status = 200
[[redirects]]
from = "/sa/noscript.gif*"
to = "https://queue.simpleanalyticscdn.com/noscript.gif:splat"
status = 200
[[redirects]]
from = "/sa/append"
to = "https://queue.simpleanalyticscdn.com/append"
status = 200
[[redirects]]
from = "/sa/post"
to = "https://api.simpleanalytics.io/post"
status = 200
# 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
# Reorganized static assets; this can probably be temporary:
[[redirects]]
from = "/fonts/inter-*"
to = "/vendor/inter/inter-:splat"
status = 301
[[redirects]]
from = "/fonts/hack-*"
to = "/vendor/hack/hack-:splat"
status = 301
[[redirects]]
from = "/twemoji/*"
to = "/vendor/emoji/:splat"
status = 301
[[redirects]]
from = "/vendor/emoji/twemoji.min.js"
to = "/vendor/emoji/emoji.min.js"
status = 301
# More miscellaneous mirrors/redirects:
[[redirects]]
from = "/resume"
to = "/resume.pdf"
status = 302
[[redirects]]
from = "/license.txt"
to = "/license/"
status = 301
[[redirects]]
from = "/privacy.html"
to = "/privacy/"
status = 301
[[redirects]]
from = "/favicon.ico"
to = "/img/favicon.ico"
status = 200
[[redirects]]
from = "/favicon-*"
to = "/img/favicon-:splat"
status = 301
[[redirects]]
from = "/apple-touch-icon*"
to = "/img/apple-touch-icon.png"
status = 301
[[redirects]]
from = "/safari-pinned-tab.svg"
to = "/img/safari-pinned-tab.svg"
status = 301
[[redirects]]
from = "/android-chrome-*"
to = "/img/android-chrome-:splat"
status = 301
[[redirects]]
from = "/me_lg.jpg"
to = "/img/me_large.jpg"
status = 301
[[redirects]]
from = "/me_large.jpg"
to = "/img/me_large.jpg"
status = 301
[[redirects]]
from = "/me.jpg"
to = "/img/me.jpg"
status = 301
[[redirects]]
from = "/logo.png"
to = "/img/logo.png"
status = 301
# H A C K E R M A N ( ͡° ͜ʖ ͡°)
[[redirects]]
from = "*/wp-admin/*"
to = "/403.html"
status = 403
force = true
[[redirects]]
from = "*/wp-includes/*"
to = "/403.html"
status = 403
force = true
[[redirects]]
from = "*/wp-login.php*"
to = "/403.html"
status = 403
force = true
[[redirects]]
from = "*/login.php*"
to = "/403.html"
status = 403
force = true