From b64d8ed944e994fea93e3bd108d36f79dc6110e0 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Sat, 22 Aug 2020 17:51:00 +0200 Subject: [PATCH 1/4] ensure blog links always use trailing slashes --- homepage/theme/templates/archives.html | 8 ++++---- homepage/theme/templates/base.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/homepage/theme/templates/archives.html b/homepage/theme/templates/archives.html index d01fe96..fa625a2 100644 --- a/homepage/theme/templates/archives.html +++ b/homepage/theme/templates/archives.html @@ -18,7 +18,7 @@
- + {{ article.title }}
@@ -26,10 +26,10 @@ {{ article.date | strftime('%d %b %Y') }}{% if article.modified %}(article.updated {{ article.modified | strftime('%d %b %Y') }}){% endif %}, {{ article.author }}

- {{ article.title }} + {{ article.title }}

-

- {{ article.description }} Read more +

+ {{ article.description }} Read more

diff --git a/homepage/theme/templates/base.html b/homepage/theme/templates/base.html index dc56e16..11a9ffc 100644 --- a/homepage/theme/templates/base.html +++ b/homepage/theme/templates/base.html @@ -135,7 +135,7 @@
- + Let's build a web that is privacy friendly and fair
@@ -143,7 +143,7 @@

- Let's build a web that is privacy friendly and fair + Let's build a web that is privacy friendly and fair

What does the term 'privacy friendly' actually stand for? Mostly it's just about technical issues that don't tackle the underlying problem. Read more @@ -162,7 +162,7 @@

- + Hosting Offen on a budget
@@ -170,7 +170,7 @@

- Hosting Offen on a budget + Hosting Offen on a budget

Here are some real world options for hosting Offen on a budget. Let's compare how they relate in terms of ease of deployment, performance and pricing. Read more From 4c6b2ff2c5289be0136364d889b32ef63a3d473d Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Wed, 26 Aug 2020 17:30:53 +0200 Subject: [PATCH 2/4] remove nginx from dev setup this was a leftover from when an offen instance was running on the same domain as the website. nginx is not needed as pelican can serve the dev content for us just fine. --- docker-compose.yml | 11 ++--------- nginx.conf | 45 --------------------------------------------- 2 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 nginx.conf diff --git a/docker-compose.yml b/docker-compose.yml index 6f0c918..8668a44 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,16 +1,9 @@ version: '3' services: - proxy: - image: nginx:1.17-alpine - volumes: - - ./nginx.conf:/etc/nginx/nginx.conf - ports: - - 8000:80 - depends_on: - - homepage - homepage: + ports: + - 8000:8000 build: context: '.' dockerfile: ./Dockerfile.python diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 727f45f..0000000 --- a/nginx.conf +++ /dev/null @@ -1,45 +0,0 @@ -events {} - -http { - include mime.types; - - upstream homepage { - server homepage:8000; - } - - map $request_uri $expires { - default off; - "~-[0-9a-z]{10}\.js$" 1d; - "~*(woff|woff2|ttf|eot)$" 1d; - } - - map $sent_http_content_type $csp { - default ""; - "~^text/html" "default-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'"; - } - - server { - listen 80; - expires $expires; - add_header Content-Security-Policy $csp; - add_header Strict-Transport-Security 'max-age=604800; includeSubDomains'; - add_header Referrer-Policy 'origin-when-cross-origin'; - add_header X-Content-Type-Options 'nosniff'; - add_header X-XSS-Protection '1; mode=block'; - - location / { - proxy_pass http://homepage; - proxy_redirect off; - } - - error_page 404 /custom_404.html; - # in development, this handles empty responses by the pelican dev server which are 404s in the end - error_page 502 /custom_404.html; - location = /custom_404.html { - internal; - proxy_pass http://homepage/404.html; - proxy_redirect off; - add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive" always; - } - } -} From ca025bc6f626cd61dee9bdfcc45e2baf0148d4ef Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Wed, 26 Aug 2020 17:35:44 +0200 Subject: [PATCH 3/4] remove unneeded file --- bootstrap.yml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 bootstrap.yml diff --git a/bootstrap.yml b/bootstrap.yml deleted file mode 100644 index c1193d5..0000000 --- a/bootstrap.yml +++ /dev/null @@ -1,12 +0,0 @@ -account_users: - - email: develop@offen.dev - password: develop - accounts: - - 9b63c4d8-65c0-438c-9d30-cc4b01173393 - - 78403940-ae4f-4aff-a395-1e90f145cf62 - -accounts: - - name: offen.dev - id: 9b63c4d8-65c0-438c-9d30-cc4b01173393 - - name: Other - id: 78403940-ae4f-4aff-a395-1e90f145cf62 From d03109222c976651b410a2af2e642301a3a338b5 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Thu, 27 Aug 2020 09:14:24 +0200 Subject: [PATCH 4/4] add content security policy to base template --- homepage/theme/templates/base.html | 1 + 1 file changed, 1 insertion(+) diff --git a/homepage/theme/templates/base.html b/homepage/theme/templates/base.html index 11a9ffc..653f09e 100644 --- a/homepage/theme/templates/base.html +++ b/homepage/theme/templates/base.html @@ -6,6 +6,7 @@ {% block title %}{{ title }}{% endblock %} +