Skip to content

Commit

Permalink
Initial opengraph stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Quackdoc committed Feb 6, 2024
1 parent a2ef468 commit beebe7c
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions templates/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,36 @@
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- open gragh stuff-->>
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
<meta name="og:title" content="{{ config.title }}" />

<meta property="og:type" content="website" />
<meta property="og:site_name" content="Quackdoc's Blog" />
{%if section.title%}
<title>{{ section.title }}</title>
<meta name="og:title" content="{{ section.title }}" />
{%endif%}
{%if section.description%}
<meta name="description" content="{{ section.description }}" />
<meta name="og:description" content="{{ section.description }}" />
{%endif%}
{% if page %}
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
{%if page.title%}
<title>{{ page.title }}</title>
<meta name="og:title" content="{{ page.title }}" />
{%endif%}
{% if page.summary %}
<meta name="description" content="{{ page.summary | safe }}" />
<meta name="og:description" content="{{ page.summary | safe }}" />
{% elif config.description %}
<meta name="description" content="{{ config.description }}" />
<meta name="og:description" content="{{ config.description }}" />
{% endif %}
{% elif config.description %}
<meta name="description" content="{{ config.description }}" />
{% endif %}

<title>{% block title %}{{ config.title }}{% endblock title %}</title>

{% endif %}

{% if config.generate_feed %}
<link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="RSS" href="{{ get_url(path=config.feed_filename) | safe }}">
{% endif %}
Expand Down

0 comments on commit beebe7c

Please sign in to comment.