Skip to content

Commit

Permalink
Add static 404 page (#2199)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Gray <dngray@privacyguides.org>
Signed-off-by: mfwmyfacewhen <94880365+mfwmyfacewhen@users.noreply.github.com>
  • Loading branch information
jonaharagon committed Jun 19, 2023
1 parent 1487ad6 commit 96da882
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 27 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ site
/i18n/
/includes/*
!/includes/*.en.*
/static/i18n/*
!/static/i18n/*.en.*
/theme/overrides/*
!/theme/overrides/*.en.*
# include Bagnard font in social card
Expand Down
5 changes: 5 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ files:
translation_replace:
"en.": ""
skip_untranslated_files: false
- source: "/static/i18n/*.en.*"
translation: "/static/i18n/%file_name%.%two_letters_code%.%file_extension%"
translation_replace:
"en.": ""
skip_untranslated_files: false
18 changes: 0 additions & 18 deletions docs/404.md

This file was deleted.

18 changes: 9 additions & 9 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,44 +32,44 @@
X-XSS-Protection = "0"
X-Content-Type-Options = "nosniff"
Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload"
Content-Security-Policy = "default-src 'none'; script-src https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src data: 'self'; connect-src https://api.github.com https://*.privacyguides.net 'self'; frame-src https://*.privacyguides.net; frame-ancestors 'none'"
Content-Security-Policy = "default-src 'none'; script-src https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self' data:; img-src data: 'self'; connect-src https://api.github.com https://*.privacyguides.net 'self'; frame-src https://*.privacyguides.net; frame-ancestors 'none'"

[[headers]]
for = "/:lang/about/donate/"
[headers.values]
Content-Security-Policy = "default-src 'none'; script-src https://opencollective.com https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src https://opencollective.com data: 'self'; connect-src https://api.github.com https://*.privacyguides.net 'self'; frame-src https://opencollective.com; frame-ancestors 'none'"
Content-Security-Policy = "default-src 'none'; script-src https://opencollective.com https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self' data:; img-src https://opencollective.com data: 'self'; connect-src https://api.github.com https://*.privacyguides.net 'self'; frame-src https://opencollective.com; frame-ancestors 'none'"

[[headers]]
for = "/:lang/tor/"
[headers.values]
Content-Security-Policy = "default-src 'none'; script-src https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src data: 'self'; connect-src https://api.github.com https://*.privacyguides.net 'self'; frame-src https://snowflake.torproject.org; frame-ancestors 'none'"
Content-Security-Policy = "default-src 'none'; script-src https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self' data:; img-src data: 'self'; connect-src https://api.github.com https://*.privacyguides.net 'self'; frame-src https://snowflake.torproject.org; frame-ancestors 'none'"

[[redirects]]
from = "/es/*"
to = "/es/404/index.html"
to = "/i18n/404.es.html"
status = 404

[[redirects]]
from = "/fr/*"
to = "/fr/404/index.html"
to = "/i18n/404.fr.html"
status = 404

[[redirects]]
from = "/he/*"
to = "/he/404/index.html"
to = "/i18n/404.he.html"
status = 404

[[redirects]]
from = "/it/*"
to = "/it/404/index.html"
to = "/i18n/404.it.html"
status = 404

[[redirects]]
from = "/nl/*"
to = "/nl/404/index.html"
to = "/i18n/404.nl.html"
status = 404

[[redirects]]
from = "/*"
to = "/en/404/index.html"
to = "/i18n/404.en.html"
status = 404
Loading

0 comments on commit 96da882

Please sign in to comment.