diff --git a/.gitmodules b/.gitmodules index 99b3bf2a..e9fd6f02 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "docs/assets/brand"] path = docs/assets/brand url = https://github.com/privacyguides/brand.git +[submodule "docs/blog"] + path = docs/blog + url = https://github.com/privacyguides/blog.git diff --git a/Pipfile b/Pipfile index 0fd56605..a9517185 100644 --- a/Pipfile +++ b/Pipfile @@ -10,6 +10,7 @@ mkdocs-static-i18n = "*" mkdocs-git-revision-date-localized-plugin = "*" typing-extensions = "*" mkdocs-minify-plugin = "*" +mkdocs-rss-plugin = "*" [dev-packages] scour = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 96a1513b..48355c81 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "76ed583036efde0ea1b0725942175f9c77c8a04f218b4822cc8dcc0f8174e2f4" + "sha256": "ce0d93277762e5052d095796291285ed1ff44183570f08ebfa71b76619eee48e" }, "pipfile-spec": 6, "requires": { @@ -182,7 +182,7 @@ "sha256:5d26852efe48c0a32b0509ffbc583fda1a2266545a78d104a6f4aff3db17d700", "sha256:c58c8eb8a762858f49e18436ff552e83914778e50e9d2f1660535ffb364552ec" ], - "markers": "python_version >= '3.7'", + "markers": "python_version < '3.10'", "version": "==4.11.4" }, "jinja2": { @@ -364,6 +364,14 @@ "index": "pypi", "version": "==0.5.0" }, + "mkdocs-rss-plugin": { + "hashes": [ + "sha256:50671e2030188da4bc01ff421d979903a01cd87b02e2ec5f430fd05d5ed55825", + "sha256:536efc35c2f62ea1eac4bae23532e07f0a19b9044291a12960f47be7d3aaf99e" + ], + "index": "pypi", + "version": "==1.1.0" + }, "mkdocs-static-i18n": { "hashes": [ "sha256:5d69b4eb284931bd048a36f923367f2a7bd0dc7b0438008dce8ca1a8feee99e2" diff --git a/docs/assets/stylesheets/blog.css b/docs/assets/stylesheets/blog.css new file mode 100644 index 00000000..66850e7c --- /dev/null +++ b/docs/assets/stylesheets/blog.css @@ -0,0 +1,34 @@ +/* Homepage hero section */ + +.mdx-hero { + color: var(--pg-hero-color); + margin: 0 0.8rem; + text-align: center; +} +.mdx-hero h1 { + color: currentcolor; + margin-bottom: 1rem; + font-size: 2.6rem; +} +@media screen and (max-width: 29.9375em) { + .mdx-hero h1 { + font-size: 1.4rem; + } +} +.mdx-hero__content { + margin-top: 2rem; + padding-bottom: 0rem; +} +[data-md-color-scheme="slate"] .mdx-hero .md-button--primary { + color: var(--md-primary-fg-color); +} +.mdx-hero .md-button--primary { + color: var(--md-primary-fg-color); + background-color: var(--pg-hero-color); + border-color: transparent; + margin-right: 0.5rem; + margin-top: 0.5rem; +} +nav[class="md-tabs"] { + border-bottom: none; +} diff --git a/docs/blog b/docs/blog new file mode 160000 index 00000000..5ef5c420 --- /dev/null +++ b/docs/blog @@ -0,0 +1 @@ +Subproject commit 5ef5c420eba5da3ebf053d83798fdb6a0853f66d diff --git a/mkdocs.yml b/mkdocs.yml index 5ace854e..1ae8c308 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -92,6 +92,12 @@ plugins: - git-revision-date-localized: exclude: - index.en.md + - rss: + match_path: "blog/.*" + pretty_print: true + date_from_meta: + as_creation: "created" + datetime_format: "%Y-%m-%d" - privacy: externals_exclude: - cdn.jsdelivr.net/npm/mathjax@3/* @@ -198,4 +204,10 @@ nav: - 'about/privacy-policy.md' - 'Donate': '/about/donate/' - 'Discussions': 'https://github.com/orgs/privacyguides/discussions' - - 'Blog': 'https://blog.privacyguides.org/' + - 'Blog': + - '2022': + - '"Move Fast and Break Things"': 'blog/2022/04/04/move-fast-and-break-things.md' + - '2021': + - 'Firefox Privacy: 2021 Update': 'blog/2021/12/01/firefox-privacy-2021-update.md' + - 'Virtual Insanity': 'blog/2021/11/01/virtual-insanity.md' + - 'Welcome to Privacy Guides': 'blog/2021/09/14/welcome-to-privacy-guides.md' diff --git a/theme/overrides/blog.en.html b/theme/overrides/blog.en.html new file mode 100644 index 00000000..fd406aed --- /dev/null +++ b/theme/overrides/blog.en.html @@ -0,0 +1,38 @@ +{% extends "base.html" %} +{% block extrahead %} + + + + + + +{% endblock %} +{% block tabs %} + {{ super() }} + +
+
+
+
+

{{ page.meta.title }}

+

{{ page.meta.created }} | {{ page.meta.author }}

+
+
+
+
+{% endblock %} +{% block content %} + {% if page.meta.image %} + + {% endif %} + + {% include ".icons/material/rss.svg" %} + + {% if "tags" in config.plugins %} + {% include "partials/tags.html" %} + {% endif %} + {% if not "\x3ch1" in page.content %} +

{{ page.title | d(config.site_name, true)}}

+ {% endif %} + {{ page.content }} +{% endblock %}