Create blog (#1365)

Signed-off-by: Daniel Gray <dng@disroot.org>
This commit is contained in:
Jonah Aragon 2022-05-31 11:01:13 -05:00 committed by Daniel Gray
parent ef9e236b2b
commit c2059a392b
No known key found for this signature in database
GPG Key ID: 41911F722B0F9AE3
7 changed files with 100 additions and 3 deletions

3
.gitmodules vendored
View File

@ -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

View File

@ -10,6 +10,7 @@ mkdocs-static-i18n = "*"
mkdocs-git-revision-date-localized-plugin = "*"
typing-extensions = "*"
mkdocs-minify-plugin = "*"
mkdocs-rss-plugin = "*"
[dev-packages]
scour = "*"

12
Pipfile.lock generated
View File

@ -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"

View File

@ -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;
}

1
docs/blog Submodule

@ -0,0 +1 @@
Subproject commit 5ef5c420eba5da3ebf053d83798fdb6a0853f66d

View File

@ -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'

View File

@ -0,0 +1,38 @@
{% extends "base.html" %}
{% block extrahead %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/blog.css' | url }}">
<link rel="me" href="https://aragon.sh/@jonah">
<link rel="me" href="https://fosstodon.org/@freddy">
<link rel="me" href="https://mastodon.social/@dngray">
<link rel="me" href="https://mastodon.social/@blacklight447">
<link rel="me" href="https://fosstodon.org/@hook54321">
{% endblock %}
{% block tabs %}
{{ super() }}
<style>.md-content > .md-typeset h1{visibility:hidden;font-size:0;}</style>
<section class="mdx-container">
<div class="md-grid md-typeset">
<div class="mdx-hero">
<div class="mdx-hero__content">
<h1>{{ page.meta.title }}</h1>
<p>{{ page.meta.created }} | {{ page.meta.author }}</p>
</div>
</div>
</div>
</section>
{% endblock %}
{% block content %}
{% if page.meta.image %}
<img src="{{ page.meta.image | url }}">
{% endif %}
<a href="{{ '/feed_rss_created.xml' | url }}" title="Open RSS Feed" class="md-content__button md-icon">
{% include ".icons/material/rss.svg" %}
</a>
{% if "tags" in config.plugins %}
{% include "partials/tags.html" %}
{% endif %}
{% if not "\x3ch1" in page.content %}
<h1>{{ page.title | d(config.site_name, true)}}</h1>
{% endif %}
{{ page.content }}
{% endblock %}