Created
September 19, 2017 22:25
-
-
Save jvanasco/430dcfc485e1b729399023111b346603 to your computer and use it in GitHub Desktop.
lektor opengraph support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[model] | |
name = Page | |
label = {{ this.title }} | |
[fields.title] | |
label = Title | |
type = string | |
[fields.meta_title] | |
label = MetaData Title | |
type = string | |
[fields.meta_description] | |
label = MetaData Description | |
type = string | |
[fields.og_title] | |
label = OpenGraph Title | |
type = string | |
[fields.og_description] | |
label = OpenGraph Description | |
type = string | |
[fields.body] | |
label = Body | |
type = markdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "site_layout.html" %} | |
{% block title %}{{ this.title }}{% endblock %} | |
{% block meta_title %}{{ this.meta_title or this.title }}{% endblock %} | |
{% block meta_description %}{{ this.meta_description }}{% endblock %} | |
{% block og_title %}{{ this.og_title or this.meta_title or this.title }}{% endblock %} | |
{% block og_description %}{{ this.og_description or this.meta_description }}{% endblock %} | |
{% block body %} | |
{{ this.body }} | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<title>{% block title %}DEFAULT TITLE{% endblock %}</title> | |
<meta name="title" content="{% block meta_title %}{% endblock %}"/> | |
<meta name="description" content="{% block meta_description %}{% endblock %}"/> | |
<meta name="author" content="AUTHOR"/> | |
<link href="{{ this.url_path | url(external=True) }}" rel="canonical"> | |
<meta property="og:title" content="{% block og_title %}{% endblock %}" /> | |
<meta property="og:site_name" content="SITE NAME" /> | |
<meta property="og:url" content="{{ this.url_path | url(external=True) }}" /> | |
<meta property="og:description" content="{% block og_description %}{% endblock %}" /> | |
<meta property="og:type" content="website" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment