privacyguides.org/netlify.toml

105 lines
4.6 KiB
TOML
Raw Normal View History

# Copyright (c) 2022-2024 Jonah Aragon <jonah@triplebit.net>
2023-03-21 17:56:27 -04:00
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
2022-10-24 09:52:33 -04:00
[build]
publish = "site/"
command = "mkdocs build --config-file config/mkdocs.en.yml && cp -r static/* site/"
2022-10-24 09:52:33 -04:00
[context.production]
2024-02-29 00:54:57 -05:00
command = "rm -rf i18n-download || true && git clone https://github.com/privacyguides/i18n i18n-download && cp -rl i18n-download/i18n . && cp -rl i18n-download/includes . && cp -rl i18n-download/theme . && mkdocs build --config-file config/mkdocs.en.yml && mkdocs build --config-file config/mkdocs.es.yml && mkdocs build --config-file config/mkdocs.fr.yml && mkdocs build --config-file config/mkdocs.he.yml && mkdocs build --config-file config/mkdocs.it.yml && mkdocs build --config-file config/mkdocs.nl.yml && mkdocs build --config-file config/mkdocs.zh-Hant.yml && mkdocs build --config-file config/mkdocs.ru.yml && cp -r static/* site/"
[context.branch-deploy]
command = "crowdin download && for i in config/mkdocs.*.yml; do mkdocs build --config-file $i; done && cp -r static/* site/"
2023-02-24 11:17:46 -05:00
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "0"
X-Content-Type-Options = "nosniff"
Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload"
2023-10-10 23:52:54 -04:00
Content-Security-Policy = "default-src 'none'; script-src https://www.privacyguides.org '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'"
Permissions-Policy = "browsing-topics=(), conversion-measurement=(), interest-cohort=(), accelerometer=(), ambient-light-sensor=(), battery=(), camera=(), display-capture=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), usb=()"
2023-02-24 11:17:46 -05:00
[[headers]]
2023-03-01 16:49:11 -05:00
for = "/:lang/about/donate/"
2023-02-24 11:17:46 -05:00
[headers.values]
2023-10-10 23:52:54 -04:00
Content-Security-Policy = "default-src 'none'; script-src https://opencollective.com https://www.privacyguides.org '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'"
2023-03-01 16:49:11 -05:00
[[headers]]
for = "/:lang/tor/"
[headers.values]
2023-10-10 23:52:54 -04:00
Content-Security-Policy = "default-src 'none'; script-src https://www.privacyguides.org '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'"
2023-02-24 11:17:46 -05:00
2023-04-04 23:25:28 -04:00
[[redirects]]
from = "/es/*"
to = "/i18n/404.es.html"
2023-04-04 23:25:28 -04:00
status = 404
2023-02-26 13:28:44 -05:00
[[redirects]]
from = "/fr/*"
to = "/i18n/404.fr.html"
2023-02-26 13:28:44 -05:00
status = 404
[[redirects]]
from = "/he/*"
to = "/i18n/404.he.html"
2023-02-26 13:28:44 -05:00
status = 404
[[redirects]]
from = "/it/*"
to = "/i18n/404.it.html"
status = 404
2023-02-26 13:28:44 -05:00
[[redirects]]
from = "/nl/*"
to = "/i18n/404.nl.html"
2023-02-26 13:28:44 -05:00
status = 404
[[redirects]]
from = "/zh-hant/*"
to = "/i18n/404.zh-Hant.html"
status = 404
2023-07-07 04:30:49 -04:00
[[redirects]]
from = "/ru/*"
to = "/i18n/404.ru.html"
status = 404
2023-02-26 13:28:44 -05:00
[[redirects]]
from = "/*"
to = "/i18n/404.en.html"
2023-02-26 13:28:44 -05:00
status = 404
[[plugins]]
package = "@netlify/plugin-lighthouse"
[[plugins.inputs.audits]]
path = "en/index.html"
[[plugins.inputs.audits]]
path = "en/tools/index.html"
2024-02-29 00:54:57 -05:00
[[plugins.inputs.audits]]
path = "en/basics/why-privacy-matters/index.html"
[[plugins.inputs.audits]]
path = "en/vpn/index.html"