diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | templates/base.html | 22 | ||||
| -rw-r--r-- | templates/page.html | 3 |
4 files changed, 26 insertions, 8 deletions
@@ -1,2 +1,3 @@ public/ linklog.json +.envrc @@ -4,12 +4,18 @@ all: ./update-linklog-json.sh zola build +.PHONY: dev dev: @echo "Starting development server..." ./update-linklog-json.sh zola serve +.PHONY: deploy +deploy: + @echo "Deploying project..." + rsync -rvzP --delete --chown 80:80 out/* $(RSYNC_TARGET) + .PHONY: clean clean: @echo "Cleaning project..." - rm -r public + rm -rf public diff --git a/templates/base.html b/templates/base.html index de01e9c..82f185e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -12,25 +12,37 @@ name="author" content="{{ page.author | default(value=config.author) }}" /> + {% if page.date %} <meta name="dcterms.date" content="{{ page.date }}" /> - {% endif %} {% if page.extra.keywords %} + {% endif %} + + {% if page.extra.keywords %} <meta name="keywords" content="{{ page.extra.keywords | join(sep=', ') }}" /> - {% endif %} {% block title %} {% if page.title %} + {% endif %} + + {% block title %} + {% if page.title %} <title>{{ page.title }} — {{ config.title }}</title> + {% elif section.title %} + <title>{{ section.title }} — {{ config.title }}</title> {% else %} <title>{{ config.title }}</title> - {% endif %} {% endblock %} {% block description %} {% if - page.description %} + {% endif %} + {% endblock %} + + {% block description %} + {% if page.description %} <meta name="description" content="{{ page.description }}" /> {% elif page.summary %} <meta name="description" content="{{ page.summary | striptags }}" /> {% else %} <meta name="description" content="{{ config.description }}" /> - {% endif %} {% endblock %} + {% endif %} + {% endblock %} <style> @font-face { diff --git a/templates/page.html b/templates/page.html index c6be731..6c288d1 100644 --- a/templates/page.html +++ b/templates/page.html @@ -10,8 +10,7 @@ <small>[{{ page.extra.kind }}]</small> </h1> -{{ page.content | replace(from="<!-- toc -->", to=macros::toc(page=page)) | safe -}} +{{ page.content | replace(from="<!-- toc -->", to=macros::toc(page=page)) | safe }} <nav class="post-nav" aria-label="Post navigation"> {% if page.higher %} |
