-
+
-
avitex
+ {{config.extra.author}}
{% include "partials/site-nav.html" %}
-{% endblock body %}
\ No newline at end of file
+{% endblock body %}
diff --git a/templates/macros.html b/templates/macros.html
index dff502c..a298adc 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -1,8 +1,8 @@
{% macro link(url) %}
{%- if url is starting_with("/") or url is starting_with("./") -%}
- {{ get_url(path=url, trailing_slash=false) }}
+ {{ get_url(path=url, trailing_slash=false) | safe }}
{%- else -%}
- {{ url }}
+ {{ url | safe }}
{%- endif -%}
{% endmacro link %}
@@ -13,3 +13,17 @@
{{ curr_url is starting_with(url) }}
{%- endif -%}
{% endmacro is_active_nav %}
+
+{% macro meta_desc(ctx) %}
+ {%- if ctx.description == "" -%}
+ {{ ctx.description }}
+ {%- else -%}
+ {%- if ctx.summary -%}
+ {{ ctx.summary | striptags | replace(from="
+", to=" ") | trim }}
+ {%- else -%}
+ {{ ctx.content | striptags | replace(from="
+", to=" ") | trim }}
+ {%- endif -%}
+ {%- endif -%}
+{% endmacro meta_desc %}
diff --git a/templates/page.html b/templates/page.html
index af64b5b..04eaf62 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -1,6 +1,4 @@
{% extends "content.html" %}
-
+{% import "macros.html" as macros %}
{% block title %}{{ page.title }} - {{ config.title }}{% endblock %}
-{% block content %}
- {{ page.content | safe }}
-{% endblock content %}
\ No newline at end of file
+{% block content %}{{ page.content | safe }}{% endblock content %}
\ No newline at end of file
diff --git a/templates/partials/site-nav.html b/templates/partials/site-nav.html
index 49e26ca..e1ddb9e 100644
--- a/templates/partials/site-nav.html
+++ b/templates/partials/site-nav.html
@@ -1,28 +1,30 @@