summary refs log tree commit diff stats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html7
-rw-r--r--templates/security_tags.html2
-rw-r--r--templates/seo_tags.html1
-rw-r--r--templates/style.css.html (renamed from templates/style.html)3
4 files changed, 9 insertions, 4 deletions
diff --git a/templates/base.html b/templates/base.html
index 4ba8442..ee206b3 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,6 +1,9 @@
 <!DOCTYPE html>
 <html lang="{{ lang | default(value="en-US" ) }}">
 <head>
+  {%- if config.webserver_sends_csp_headers %}
+  {%- include "security_tags.html" ignore missing %}
+  {%- endif %}
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   {% include "favicon.html" ignore missing -%}
@@ -12,7 +15,9 @@
   <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=config.feed_filename) | safe }}">
   {%- endblock -%}
   {%- endif %}
-  {% include "style.html" ignore missing -%}
+  <style>
+  {%- include "style.css.html" ignore missing -%}
+  </style>
   {% include "custom_head.html" ignore missing -%}
 </head>
 <body>
diff --git a/templates/security_tags.html b/templates/security_tags.html
new file mode 100644
index 0000000..0f922ea
--- /dev/null
+++ b/templates/security_tags.html
@@ -0,0 +1,2 @@
+<!-- These tags are here for demostration. It's recommended to send them via HTTP headers instead. -->
+<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'unsafe-inline'">
diff --git a/templates/seo_tags.html b/templates/seo_tags.html
index 797569a..4eb2bc8 100644
--- a/templates/seo_tags.html
+++ b/templates/seo_tags.html
@@ -1 +1,2 @@
 <meta name="title" content="{% if page.title %}{{ page.title }}{% else %}{{ config.title }}{% endif %}">
+<meta name="description" content="{{ config.description }}" />
diff --git a/templates/style.html b/templates/style.css.html
index 4744695..00b4131 100644
--- a/templates/style.html
+++ b/templates/style.css.html
@@ -1,4 +1,3 @@
-<style>
   body {
     font-family: Verdana, sans-serif;
     margin: auto;
@@ -168,5 +167,3 @@
       color: #aaa;
     }
   }
-
-</style>