From 77c073c6025a8ef26d9b6a10afe9a88073cfa495 Mon Sep 17 00:00:00 2001 From: Jonah Aragon Date: Mon, 27 Mar 2023 10:11:11 -0500 Subject: [PATCH] Deploy preview warning (#2104) --- config/mkdocs.common.yml | 1 + theme/main.html | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/config/mkdocs.common.yml b/config/mkdocs.common.yml index e43b7d9f..71b49a02 100644 --- a/config/mkdocs.common.yml +++ b/config/mkdocs.common.yml @@ -19,6 +19,7 @@ # IN THE SOFTWARE. extra: + context: !ENV [CONTEXT, "production"] social: - icon: simple/mastodon link: https://mastodon.neat.computer/@privacyguides diff --git a/theme/main.html b/theme/main.html index f05a188c..ed83e22e 100644 --- a/theme/main.html +++ b/theme/main.html @@ -60,4 +60,10 @@ Visit privacyguides.org for the latest version. +{% elif config.extra.context == "deploy-preview" %} + You're viewing an unreviewed preview of Privacy Guides built on {{ build_date_utc }}. + These previews are user-submitted and may not necessarily reflect the opinion of the site. + + Visit privacyguides.org for current advice. + {% else %}{% endif %}{% endblock %}