From 72f74406b98ce12e13a08cbca73c11665834120b Mon Sep 17 00:00:00 2001 From: Jonah Aragon Date: Tue, 30 Aug 2022 13:35:11 -0500 Subject: [PATCH] Blog replacement (#1704) --- Pipfile | 1 + Pipfile.lock | 26 +++++++++++++++++++------- README.md | 10 +--------- data/articles.yml | 22 ++++++++++++++++++++++ docs/articles.en.md | 9 +++++++++ docs/news-aggregators.en.md | 4 ++-- mkdocs-material | 2 +- mkdocs.production.yml | 1 + mkdocs.yml | 7 ++++++- 9 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 data/articles.yml create mode 100644 docs/articles.en.md diff --git a/Pipfile b/Pipfile index 4b426b52..24953ed3 100644 --- a/Pipfile +++ b/Pipfile @@ -12,6 +12,7 @@ typing-extensions = "*" mkdocs-minify-plugin = "*" mkdocs-rss-plugin = "*" mkdocs-git-committers-plugin-2 = "*" +mkdocs-macros-plugin = "*" [dev-packages] scour = "*" diff --git a/Pipfile.lock b/Pipfile.lock index f6c2dfb9..7b244485 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "d3a92aec93d430ec2770963ae2dc2f72ad9f0dd042170dc90ab7a0c07b6dcda6" + "sha256": "bc99c3ae97af3b039c20ec5ed0cb345e76d171f08cb8c1e2aface7fad4bab695" }, "pipfile-spec": 6, "requires": { @@ -369,11 +369,11 @@ }, "mkdocs-git-committers-plugin-2": { "hashes": [ - "sha256:a801eb4623a3516f70bc6190f103c1301055518f11a98f5a375d52aa17f42bea", - "sha256:da514637f51ed816d3bc66fd8afdd023156341a8a84e86d9283264f39b53131c" + "sha256:1e88c38bfe299a2737ebcf61e8cc27a5193b03d826f743e676ba59960b376c8e", + "sha256:617c413ea6b6a160169e601520b7a52377bce5d59f7788b948cdc067e8ced77c" ], "index": "pypi", - "version": "==1.0.2" + "version": "==1.1.0" }, "mkdocs-git-revision-date-localized-plugin": { "hashes": [ @@ -383,9 +383,17 @@ "index": "pypi", "version": "==1.1.0" }, + "mkdocs-macros-plugin": { + "hashes": [ + "sha256:96bdabeb98b96139544f0048ea2f5cb80c7befde6b21e94c6d4596c22774cbcf", + "sha256:9e64e1cabcf6925359de29fe54f62d5847fb455c2528c440b87f8f1240650608" + ], + "index": "pypi", + "version": "==0.7.0" + }, "mkdocs-material": { "path": "./mkdocs-material", - "version": "==8.4.2+insiders.4.22.0" + "version": "==8.4.0+insiders.4.21.1" }, "mkdocs-material-extensions": { "hashes": [ @@ -447,7 +455,6 @@ "sha256:337a74fd2f291c607d220c793a8135273c4c2ab001b03e601c36766005f36885", "sha256:37ff6b522a26d0538b753f0b4e8e164fdada12db6c6f00f62145d732d8a3152e", "sha256:3d1f14f5f691f55e1b47f824ca4fdcb4b19b4323fe43cc7bb105988cad7496be", - "sha256:408673ed75594933714482501fe97e055a42996087eeca7e5d06e33218d05aa8", "sha256:4134d3f1ba5f15027ff5c04296f13328fecd46921424084516bdb1b2548e66ff", "sha256:4ad2f835e0ad81d1689f1b7e3fbac7b01bb8777d5a985c8962bedee0cc6d43da", "sha256:50dff9cc21826d2977ef2d2a205504034e3a4563ca6f5db739b0d1026658e004", @@ -456,7 +463,6 @@ "sha256:69bd1a15d7ba3694631e00df8de65a8cb031911ca11f44929c97fe05eb9b6c1d", "sha256:6bf088c1ce160f50ea40764f825ec9b72ed9da25346216b91361eef8ad1b8f8c", "sha256:6e8c66f70fb539301e064f6478d7453e820d8a2c631da948a23384865cd95544", - "sha256:727dd1389bc5cb9827cbd1f9d40d2c2a1a0c9b32dd2261db522d22a604a6eec9", "sha256:74a04183e6e64930b667d321524e3c5361094bb4af9083db5c301db64cd341f3", "sha256:75e636fd3e0fb872693f23ccb8a5ff2cd578801251f3a4f6854c6a5d437d3c04", "sha256:7761afe0126d046974a01e030ae7529ed0ca6a196de3ec6937c11df0df1bc91c", @@ -697,6 +703,12 @@ "markers": "python_version >= '3.6'", "version": "==2.3.2.post1" }, + "termcolor": { + "hashes": [ + "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b" + ], + "version": "==1.1.0" + }, "tinycss2": { "hashes": [ "sha256:b2e44dd8883c360c35dd0d1b5aad0b610e5156c2cb3b33434634e539ead9d8bf", diff --git a/README.md b/README.md index 2c4069e9..283c46ee 100644 --- a/README.md +++ b/README.md @@ -58,14 +58,6 @@ Our current list of team members can be found [here](https://github.com/orgs/pri - Browse our [open issues](https://github.com/privacyguides/privacyguides.org/issues) to see what needs to be updated - View some contribution tips on our [contributor's wiki](https://github.com/privacyguides/privacyguides.org/wiki) -### Blog - -We aspire to publish the best articles about privacy on the net. From hot-takes to long-form essays, we are looking for stylish and well-written pieces. - -This not a place for sponsored content or SEO-obsessed posts. Please do **not** pitch us this, as we don't take kindly to it and your email will be blocked. *Caveat scriptor.* - -Submit stories or requests to: `freddy@privacyguides.org` - ## Mirrors [![GitHub](https://img.shields.io/static/v1?logo=github&label=&message=GitHub&color=000&style=for-the-badge)](https://github.com/privacyguides/privacyguides.org) @@ -86,7 +78,7 @@ This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdoc - `git submodule update docs/assets/brand` - `git config gpg.ssh.allowedSignersFile .allowed_signers` 2. Install [Python 3.6+](https://www.python.org/downloads/) (currently only tested with 3.10) -3. Install [dependencies](/Pipfile): `pip install mkdocs mkdocs-material mkdocs-static-i18n typing-extensions` +3. Install [dependencies](/Pipfile): `pip install mkdocs mkdocs-material mkdocs-static-i18n mkdocs-macros-plugin typing-extensions` 4. Serve the site locally: `mkdocs serve` - The site will be available at `http://localhost:8000` - You can build the site locally with `mkdocs build` diff --git a/data/articles.yml b/data/articles.yml new file mode 100644 index 00000000..1008a023 --- /dev/null +++ b/data/articles.yml @@ -0,0 +1,22 @@ +extra: + articles: + - name: '"Hide Nothing"' + publisher: Privacy Guides + url: 'blog/2022/06/09/hide-nothing.md' + date: 2022-06-09 + - name: '"Move Fast and Break Things"' + publisher: Privacy Guides + url: 'blog/2022/04/04/move-fast-and-break-things.md' + date: 2022-04-04 + - name: 'Firefox Privacy: 2021 Update' + publisher: Privacy Guides + url: 'blog/2021/12/01/firefox-privacy-2021-update.md' + date: 2021-12-01 + - name: 'Virtual Insanity' + publisher: Privacy Guides + url: 'blog/2021/11/01/virtual-insanity.md' + date: 2021-11-01 + - name: 'Welcome to Privacy Guides' + publisher: Privacy Guides + url: 'blog/2021/09/14/welcome-to-privacy-guides.md' + date: 2021-09-14 diff --git a/docs/articles.en.md b/docs/articles.en.md new file mode 100644 index 00000000..6103bf03 --- /dev/null +++ b/docs/articles.en.md @@ -0,0 +1,9 @@ +--- +title: Curated Articles from Around the Web +hide: + - navigation + - feedback +--- +{% for article in articles %} +- **{{ article.date }}**: [{{ article.name }}]({{ article.url }}) from *{{ article.publisher }}* +{% endfor %} diff --git a/docs/news-aggregators.en.md b/docs/news-aggregators.en.md index 7ae0e392..bd7a305e 100644 --- a/docs/news-aggregators.en.md +++ b/docs/news-aggregators.en.md @@ -155,7 +155,7 @@ You can subscribe YouTube channels without logging in and associating usage info !!! example - To subscribe to a YouTube channel with an RSS client, first look for your [channel code](https://support.google.com/youtube/answer/6180214), replace `channel_id` below: + To subscribe to a YouTube channel with an RSS client, first look for your [channel code](https://support.google.com/youtube/answer/6180214), replace `[CHANNEL ID]` below: ```text - https://www.youtube.com/feeds/videos.xml?channel_id={{ channel id }} + https://www.youtube.com/feeds/videos.xml?channel_id=[CHANNEL ID] ``` diff --git a/mkdocs-material b/mkdocs-material index cf0c21bf..62d4e1ca 160000 --- a/mkdocs-material +++ b/mkdocs-material @@ -1 +1 @@ -Subproject commit cf0c21bf6c961df0cde8d969b7c92ffaa65c3dd4 +Subproject commit 62d4e1caac3cca088cce4c16ed399fa25f958fe3 diff --git a/mkdocs.production.yml b/mkdocs.production.yml index 3322a717..d3d67787 100644 --- a/mkdocs.production.yml +++ b/mkdocs.production.yml @@ -76,3 +76,4 @@ watch: - theme - includes - mkdocs.yml + - data diff --git a/mkdocs.yml b/mkdocs.yml index d97f3cac..e6228584 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -69,6 +69,10 @@ plugins: build: false tags: {} search: {} + macros: + on_error_fail: true + include_yaml: + - data/articles.yml markdown_extensions: admonition: {} @@ -178,7 +182,8 @@ nav: - 'about/privacy-policy.md' - 'Donate': '/about/donate/' - 'Discussions': 'https://github.com/privacyguides/privacyguides.org/discussions' - - 'Blog': + - 'Articles': + - 'articles.md' - '2022': - '"Hide Nothing"': 'blog/2022/06/09/hide-nothing.md' - '"Move Fast and Break Things"': 'blog/2022/04/04/move-fast-and-break-things.md'