Skip to content
Snippets Groups Projects
Unverified Commit 2b9181cd authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add basic support for Open Graph

parent c23ff3b0
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,10 @@ include_content = true
index_format = "elasticlunr_json"
#[extra.og.image]
#url =
#alt =
[extra.footer]
address = "Kennedyallee 18<br/>53175 Bonn"
bank = "<b>IBAN:</b> DE31 3705 0198 1933 0485 46<br/><b>BIC:</b> COLSDE33XXX<br/>Sparkasse KoelnBonn"
......
{% if page -%}
{% set thing = page -%}
{% else -%}
{% set thing = section -%}
{% endif -%}
<!DOCTYPE html>
<html lang="{{ lang }}">
<head>
......@@ -5,15 +10,30 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
{% block meta %}
{% if config.description %}<meta name="description" content="{{ config.description }}" />{% endif %}
<link rel="alternate" type="application/atom+xml" href="{{ get_url(path="atom.xml", trailing_slash=false) }}" />
<meta name="description" content="{{ thing.description | default(value=config.description) }}" />
<link rel="alternate" type="application/atom+xml" href="{{ get_url(path="atom.xml", trailing_slash=false) }}" />
{% endblock %}
{% block og %}
<meta property="og:site_name" content="{{ config.title }}" />
<meta property="og:title" content="{% block og_title %}{{ thing.title | default(value=config.title) }}{% endblock og_title %}" />
<meta property="og:description" content="{{ thing.description | default(value=config.description) }}" />
<meta property="og:type" content="{% block og_type %}{{ thing.extra.og.type | default(value='article') }}{% endblock og_type %}" />
<meta property="og:url" content="{% block og_url %}{{ thing.permalink | safe }}{% endblock og_url %}" />
{% if thing.extra.depiction %}
<meta property="og:image" content="{{ get_url(path="@/" ~ thing.relative_path, trailing_slash=true) }}{{ thing.extra.depiction.image | safe }}" />
<meta property="og:image:alt" content="{{ thing.extra.depiction.alt }}" />
{% elif config.extra.og.image %}
<meta property="og:image" content="{{ get_url(path=config.extra.og.image.url) }}" />
<meta property="og:image:alt" content="{{ config.extra.og.image.alt }}" />
{% endif %}
{% endblock %}
<link rel="stylesheet" href="{{ get_url(path="fonts/roboto/index.css") }}" />
<link rel="stylesheet" href="{{ get_url(path="fonts/font-awesome/css/all.css") }}" />
<link rel="stylesheet" href="{{ get_url(path="style.css") }}" />
<title>{% block title %}{{ config.title }}{% endblock %}</title>
<title>{% block title %}{{ thing.title }}{% endblock %}</title>
</head>
<body class="has-navbar-fixed-top">
......
{% extends "base.html" %}
{% block meta %}
{% if section.description %}
<meta name="description" content="{{ page.description }}" />
{% elif config.description %}
<meta name="description" content="{{ config.description }}" />
{% endif %}
{% endblock %}
{% block title %}
{{ section.title }}
{% endblock %}
{% block main %}
<div class="my-4">
<div class="section">
......
{% extends "base.html" %}
{% block meta %}
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
{% elif config.description %}
<meta name="description" content="{{ config.description }}" />
{% endif %}
{% endblock %}
{% block title %}
{{ page.title }}
{% endblock %}
{% block main %}
<h1>{{ page.title }}</h1>
<div class="my-4">
......
{% extends "base.html" %}
{% block og_type %}website{% endblock %}
{% block main %}
{% include "frontpage/blocks/claim.html" %}
{% include "frontpage/blocks/projects.html" %}
......
{% extends "base.html" %}
{% block meta %}
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
{% elif config.description %}
<meta name="description" content="{{ config.description }}" />
{% endif %}
{% endblock %}
{% block title %}
{{ page.title }}
{% endblock %}
{% block main %}
{% include "pages/heading.html" %}
<div class="my-4">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment