From 7fb07925ecfcb8b91719065f564b95c983d39310 Mon Sep 17 00:00:00 2001 From: Jonah Aragon Date: Fri, 3 Mar 2023 08:17:15 -0600 Subject: [PATCH] SEO fixes (#2070) --- _redirects | 112 +++++++++--------- docs/404.md | 3 + netlify.toml | 234 ------------------------------------- theme/main.html | 34 ++++++ theme/partials/header.html | 2 +- 5 files changed, 95 insertions(+), 290 deletions(-) diff --git a/_redirects b/_redirects index 9d3e28ea..96027b63 100644 --- a/_redirects +++ b/_redirects @@ -4,58 +4,60 @@ / /nl/ 302 Language=nl / /en/ 302 -/sitemap.xml /en/sitemap.xml -/CODE_OF_CONDUCT/ /en/CODE_OF_CONDUCT/ -/android/ /en/android/ -/calendar/ /en/calendar/ -/cloud/ /en/cloud/ -/data-redaction/ /en/data-redaction/ -/desktop-browsers/ /en/desktop-browsers/ -/desktop/ /en/desktop/ -/dns/ /en/dns/ -/email-clients/ /en/email-clients/ -/email/ /en/email/ -/encryption/ /en/encryption/ -/file-sharing/ /en/file-sharing/ -/frontends/ /en/frontends/ -/kb-archive/ /en/kb-archive/ -/mobile-browsers/ /en/mobile-browsers/ -/multi-factor-authentication/ /en/multi-factor-authentication/ -/news-aggregators/ /en/news-aggregators/ -/notebooks/ /en/notebooks/ -/passwords/ /en/passwords/ -/productivity/ /en/productivity/ -/real-time-communication/ /en/real-time-communication/ -/router/ /en/router/ -/search-engines/ /en/search-engines/ -/tools/ /en/tools/ -/tor/ /en/tor/ -/video-streaming/ /en/video-streaming/ -/vpn/ /en/vpn/ -/about/criteria/ /en/about/criteria/ -/about/donate/ /en/about/donate/ -/about/ /en/about/ -/about/notices/ /en/about/notices/ -/about/privacy-policy/ /en/about/privacy-policy/ -/about/privacytools/ /en/about/privacytools/ -/about/services/ /en/about/services/ -/about/statistics/ /en/about/statistics/ -/advanced/communication-network-types/ /en/advanced/communication-network-types/ -/advanced/dns-overview/ /en/advanced/dns-overview/ -/advanced/tor-overview/ /en/advanced/tor-overview/ -/basics/account-creation/ /en/basics/account-creation/ -/basics/account-deletion/ /en/basics/account-deletion/ -/basics/common-misconceptions/ /en/basics/common-misconceptions/ -/basics/common-threats/ /en/basics/common-threats/ -/basics/email-security/ /en/basics/email-security/ -/basics/multi-factor-authentication/ /en/basics/multi-factor-authentication/ -/basics/passwords-overview/ /en/basics/passwords-overview/ -/basics/threat-modeling/ /en/basics/threat-modeling/ -/basics/vpn-overview/ /en/basics/vpn-overview/ -/meta/brand/ /en/meta/brand/ -/meta/git-recommendations/ /en/meta/git-recommendations/ -/meta/uploading-images/ /en/meta/uploading-images/ -/meta/writing-style/ /en/meta/writing-style/ -/os/android-overview/ /en/os/android-overview/ -/os/linux-overview/ /en/os/linux-overview/ -/os/qubes-overview/ /en/os/qubes-overview/ +/.well-known/matrix/* https://matrix.privacyguides.org/.well-known/matrix/:splat 200 + +/kb /en/basics/threat-modeling/ +/:lang/kb /:lang/basics/threat-modeling/ + +/coc/ /en/CODE_OF_CONDUCT/ + +/team /en/about/ +/browsers /en/desktop-browsers/ +/blog https://blog.privacyguides.org +/basics/dns-overview /en/advanced/dns-overview/ +/basics/tor-overview /en/advanced/tor-overview/ +/real-time-communication/communication-network-types /en/advanced/communication-network-types +/advanced/real-time-communication /en/advanced/communication-network-types +/android/overview /en/os/android-overview/ +/linux-desktop/overview /en/os/linux-overview/ +/android/grapheneos-vs-calyxos https://blog.privacyguides.org/2022/04/21/grapheneos-or-calyxos/ +/ios/configuration https://blog.privacyguides.org/2022/10/22/ios-configuration-guide/ +/linux-desktop/hardening https://blog.privacyguides.org/2022/04/22/linux-system-hardening/ +/linux-desktop/sandboxing https://blog.privacyguides.org/2022/04/22/linux-application-sandboxing/ +/advanced/signal-configuration-hardening https://blog.privacyguides.org/2022/07/07/signal-configuration-and-hardening/ +/real-time-communication/signal-configuration-hardening https://blog.privacyguides.org/2022/07/07/signal-configuration-and-hardening/ +/advanced/integrating-metadata-removal https://blog.privacyguides.org/2022/04/09/integrating-metadata-removal/ +/advanced/erasing-data https://blog.privacyguides.org/2022/05/25/secure-data-erasure/ +/operating-systems /en/desktop/ +/threat-modeling /en/basics/threat-modeling/ +/self-contained-networks /en/tor/ +/privacy-policy /en/about/privacy-policy/ +/metadata-removal-tools /en/data-redaction/ +/basics /en/kb +/software/file-encryption /en/encryption/ +/providers /en/tools/#service-providers +/software/calendar-contacts /en/calendar/ +/calendar-contacts /en/calendar/ +/software/metadata-removal-tools /en/data-redaction/ +/contact /en/about/ +/welcome-to-privacy-guides https://blog.privacyguides.org/2021/09/14/welcome-to-privacy-guides/ +/software/email /en/email-clients/ +/providers/paste /en/tools/ +/blog/2019/10/05/understanding-vpns https://www.jonaharagon.com/posts/understanding-vpns/ +/terms-and-notices /en/about/notices/ +/software/networks /en/tor/ +/social-news-aggregator /en/news-aggregators/ +/basics/erasing-data https://blog.privacyguides.org/2022/05/25/secure-data-erasure/ +/linux-desktop /en/desktop/ + +/providers/:slug /en/:slug/ +/software/:slug /en/:slug/ +/blog/* https://blog.privacyguides.org/:splat +/assets/* /en/assets/:splat + +/:slug/ /en/:slug/ +/about/:slug/ /en/about/:slug/ +/advanced/:slug/ /en/advanced/:slug/ +/basics/:slug/ /en/basics/:slug/ +/meta/:slug/ /en/meta/:slug/ +/os/:slug/ /en/os/:slug/ diff --git a/docs/404.md b/docs/404.md index 9f3290b8..563815b9 100644 --- a/docs/404.md +++ b/docs/404.md @@ -1,6 +1,9 @@ --- hide: - feedback +meta: + - property: "robots" + content: "noindex, nofollow" --- # 404 - Not Found diff --git a/netlify.toml b/netlify.toml index 82ef433b..542273f2 100644 --- a/netlify.toml +++ b/netlify.toml @@ -21,240 +21,6 @@ [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'" -[[redirects]] - from = "/.well-known/matrix/*" - to = "https://matrix.privacyguides.org/.well-known/matrix/:splat" - status = 200 - force = true - -[[redirects]] - from = "/kb" - to = "/en/basics/threat-modeling/" - -[[redirects]] - from = "/:lang/kb" - to = "/:lang/basics/threat-modeling/" - -[[redirects]] - from = "/coc" - to = "/en/CODE_OF_CONDUCT/" - -[[redirects]] - from = "/team" - to = "/en/about/" - -[[redirects]] - from = "/browsers" - to = "/en/desktop-browsers/" - -[[redirects]] - from = "/blog" - to = "https://blog.privacyguides.org" - -[[redirects]] - from = "/blog/2021/12/01/firefox-privacy-2021-update" - to = "https://blog.privacyguides.org/2021/12/01/firefox-privacy-2021-update/" - -[[redirects]] - from = "/blog/2021/09/14/welcome-to-privacy-guides" - to = "https://blog.privacyguides.org/2021/09/14/welcome-to-privacy-guides/" - -[[redirects]] - from = "/blog/2022/06/09/hide-nothing" - to = "https://blog.privacyguides.org/2022/06/09/hide-nothing/" - -[[redirects]] - from = "/blog/2022/04/04/move-fast-and-break-things" - to = "https://blog.privacyguides.org/2022/04/04/move-fast-and-break-things/" - -[[redirects]] - from = "/blog/2021/11/01/virtual-insanity" - to = "https://blog.privacyguides.org/2021/11/01/virtual-insanity" - -[[redirects]] - from = "/basics/dns-overview" - to = "/en/advanced/dns-overview/" - -[[redirects]] - from = "/basics/tor-overview" - to = "/en/advanced/tor-overview/" - -[[redirects]] - from = "/real-time-communication/communication-network-types" - to = "/en/advanced/communication-network-types" - -[[redirects]] - from = "/advanced/real-time-communication" - to = "/en/advanced/communication-network-types" - -[[redirects]] - from = "/android/overview" - to = "/en/os/android-overview/" - -[[redirects]] - from = "/linux-desktop/overview" - to = "/en/os/linux-overview/" - -[[redirects]] - from = "/android/grapheneos-vs-calyxos" - to = "https://blog.privacyguides.org/2022/04/21/grapheneos-or-calyxos/" - -[[redirects]] - from = "/ios/configuration" - to = "https://blog.privacyguides.org/2022/10/22/ios-configuration-guide/" - -[[redirects]] - from = "/linux-desktop/hardening" - to = "https://blog.privacyguides.org/2022/04/22/linux-system-hardening/" - -[[redirects]] - from = "/linux-desktop/sandboxing" - to = "https://blog.privacyguides.org/2022/04/22/linux-application-sandboxing/" - -[[redirects]] - from = "/advanced/signal-configuration-hardening" - to = "https://blog.privacyguides.org/2022/07/07/signal-configuration-and-hardening/" - -[[redirects]] - from = "/real-time-communication/signal-configuration-hardening" - to = "https://blog.privacyguides.org/2022/07/07/signal-configuration-and-hardening/" - -[[redirects]] - from = "/advanced/integrating-metadata-removal" - to = "https://blog.privacyguides.org/2022/04/09/integrating-metadata-removal/" - -[[redirects]] - from = "/advanced/erasing-data" - to = "https://blog.privacyguides.org/2022/05/25/secure-data-erasure/" - -[[redirects]] - from = "/providers/dns" - to = "/en/dns/" - -[[redirects]] - from = "/software/video-streaming" - to = "/en/video-streaming/" - -[[redirects]] - from = "/providers/vpn" - to = "/en/vpn/" - -[[redirects]] - from = "/operating-systems" - to = "/en/desktop/" - -[[redirects]] - from = "/providers/email" - to = "/en/email/" - -[[redirects]] - from = "/threat-modeling" - to = "/en/basics/threat-modeling/" - -[[redirects]] - from = "/software/passwords" - to = "/en/passwords/" - -[[redirects]] - from = "/self-contained-networks" - to = "/en/tor/" - -[[redirects]] - from = "/privacy-policy" - to = "/en/about/privacy-policy/" - -[[redirects]] - from = "/metadata-removal-tools" - to = "/en/data-redaction/" - -[[redirects]] - from = "/basics" - to = "/en/kb" - -[[redirects]] - from = "/software/file-encryption" - to = "/en/encryption/" - -[[redirects]] - from = "/providers" - to = "/en/tools/#service-providers" - -[[redirects]] - from = "/software/notebooks" - to = "/en/notebooks/" - -[[redirects]] - from = "/software/calendar-contacts" - to = "/en/calendar/" - -[[redirects]] - from = "/calendar-contacts" - to = "/en/calendar/" - -[[redirects]] - from = "/software/metadata-removal-tools" - to = "/en/data-redaction/" - -[[redirects]] - from = "/contact" - to = "/en/about/" - -[[redirects]] - from = "/welcome-to-privacy-guides" - to = "https://blog.privacyguides.org/2021/09/14/welcome-to-privacy-guides/" - -[[redirects]] - from = "/software/email" - to = "/en/email-clients/" - -[[redirects]] - from = "/providers/paste" - to = "/en/tools/" - -[[redirects]] - from = "/providers/search-engines" - to = "/en/search-engines/" - -[[redirects]] - from = "/software/productivity" - to = "/en/productivity/" - -[[redirects]] - from = "/software/real-time-communication" - to = "/en/real-time-communication/" - -[[redirects]] - from = "/blog/2019/10/05/understanding-vpns" - to = "https://www.jonaharagon.com/posts/understanding-vpns/" - -[[redirects]] - from = "/terms-and-notices" - to = "/en/about/notices/" - -[[redirects]] - from = "/software/file-sharing" - to = "/en/file-sharing/" - -[[redirects]] - from = "/software/networks" - to = "/en/tor/" - -[[redirects]] - from = "/social-news-aggregator" - to = "/en/news-aggregators/" - -[[redirects]] - from = "/basics/erasing-data" - to = "https://blog.privacyguides.org/2022/05/25/secure-data-erasure/" - -[[redirects]] - from = "/linux-desktop" - to = "/en/desktop/" - -[[redirects]] - from = "/assets/*" - to = "/en/assets/:splat" - [[redirects]] from = "/fr/*" to = "/fr/404/index.html" diff --git a/theme/main.html b/theme/main.html index 94d9808c..370dea94 100644 --- a/theme/main.html +++ b/theme/main.html @@ -1 +1,35 @@ {% extends "base.html" %} +{% block site_meta %} + + + {% if page.meta and page.meta.description %} + + {% elif config.site_description %} + + {% endif %} + {% if page.meta and page.meta.author %} + + {% elif config.site_author %} + + {% endif %} + {% if page.canonical_url %} + + {% endif %} + {% if page.previous_page %} + + {% endif %} + {% if page.next_page %} + + {% endif %} + {% if config.extra.alternate is iterable %} + {% for alt in config.extra.alternate %} + + {% endfor %} + {% endif %} + {% if "rss" in config.plugins %} + + + {% endif %} + + +{% endblock %} diff --git a/theme/partials/header.html b/theme/partials/header.html index acca7aa3..a3906c12 100644 --- a/theme/partials/header.html +++ b/theme/partials/header.html @@ -55,7 +55,7 @@