Source Code

/ ssg / src / blog / templates / blog / partial / seo.html

{% if is_post and post %}
    <link rel="canonical" href="{{ SITE_URL }}{{ post.get_absolute_url }}" />
    <meta name="description" content="{{ post.description }}" />
    <meta name="keywords" content="{{ post.column.name }}" />
    <meta name="author" content="{{ post.author.name }}" />
    <meta property="og:title" content="{{ post.title }}" />
    <meta property="og:description" content="{{ post.description }}" />
    <meta property="og:url" content="{{ SITE_URL }}{{ post.get_absolute_url }}" />
    <meta property="og:type" content="article" />
    <meta property="og:image" content="{{ post.image }}" />
    <meta property="article:author" content="{{ post.author.name }}" />
    <meta property="article:section" content="{{ post.column }}" />
    <meta property="article:tag" content="{{ post.column.name }}" />
    <meta property="article:published_time" content="{{ post.date|date:'c' }}" />
    <meta name="twitter:title" content="{{ post.title }}" />
    <meta name="twitter:description" content="{{ post.description }}" />
    <meta name="twitter:image" content="{{ post.image }}" />
    <meta name="twitter:card" content="summary" />
{% endif %}

{% if is_post_list and column_name %}
    {% comment %} column index {% endcomment %}
    <link rel="canonical" href="{{ SITE_URL }}/column/{{ column_name }}" />
    <meta name="description" content="articles in the {{ column_name }} column" />
    <meta name="keywords" content="{{ column_name }}" />
    <meta property="og:title" content="{{ column_name }} - {{ SITE_TITLE }}" />
    <meta property="og:description" content="articles in the {{ column_name }} column" />
    <meta property="og:url" content="{{ SITE_URL }}/column/{{ column_name }}" />
    <meta property="article:section" content="{{ column_name }}" />
    <meta property="article:tag" content="{{ column_name }}" />
    <meta name="twitter:title" content="{{ column_name }} - {{ SITE_TITLE }}" />
    <meta name="twitter:description" content="articles in the {{ column_name }} column" />
    <meta name="twitter:card" content="summary_large_image" />
    <meta property="og:image" content="https://goeshard.org/static/layout/logo/chicagorockers2.webp" />
    <meta name="twitter:image" content="https://goeshard.org/static/layout/logo/chicagorockers2.webp" />
{% elif is_post_list and is_homepage %}
    {% comment %} main index {% endcomment %}
    <meta name="twitter:card" content="summary_large_image" />
    <meta property="og:type" content="website" />
    <meta property="og:image" content="https://goeshard.org/static/layout/logo/chicagorockers2.webp" />
    <meta name="twitter:image" content="https://goeshard.org/static/layout/logo/chicagorockers2.webp" />
    <meta property="og:title" content="{{ SITE_TITLE }}" />
    <meta property="og:description" content="{{ SITE_DESCRIP }}" />
    <meta property="og:url" content="{{ SITE_URL }}" />
    <meta name="twitter:title" content="{{ SITE_TITLE }}" />
    <meta name="twitter:description" content="{{ SITE_DESCRIP }}" />
    <meta name="description" content="{{ SITE_DESCRIP }}" />
{% endif %}

{% if is_archive and year %}
    <meta name="description" content="Archived Posts from {% if month %}{{ month.name }} {% endif %}{{ year }}" />
    {% comment %} <meta name="keywords" content="{{ post.column.name }}" /> {% endcomment %}
    <meta property="og:title" content="Archive - {{ SITE_TITLE }}" />
    <meta property="og:description" content="Archived Posts from {% if month %}{{ month.name }} {% endif %}{{ year }}" />
    {% if day %}
        {% comment %} is day {% endcomment %}
        {% with d=day|stringformat:"02d" %}
        <meta property="og:url" content="{{ SITE_URL }}/{{year}}/{{month.month_str}}/{{d}}" />
        {% endwith %}
    {% elif not month %}
        {% comment %} is year {% endcomment %}
        <meta property="og:url" content="{{ SITE_URL }}/{{year}}" />
    {% else %}
        {% comment %} is month {% endcomment %}
        <meta property="og:url" content="{{ SITE_URL }}/{{year}}/{{month.month_str}}/" />
    {% endif %}
    <meta name="twitter:title" content="Archive - {{ SITE_TITLE }}" />
    <meta name="twitter:description" content="Archived Posts from {% if month %}{{ month.name }} {% endif %}{{ year }}" />
    <meta property="article:published_time" content="{{year}}{% if month %}-{{month.month_str}}{% endif %}{% if day %}{% with d=day|stringformat:"02d" %}-{{d}}{% endwith %}{% endif %}" />
    <meta name="twitter:card" content="summary_large_image" />
    <meta property="og:image" content="https://goeshard.org/static/layout/logo/chicagorockers2.webp" />
    <meta name="twitter:image" content="https://goeshard.org/static/layout/logo/chicagorockers2.webp" />
{% endif %}

{% if is_author and author %}
    {% comment %} author detial {% endcomment %}
    <link rel="canonical" href="{{ SITE_URL }}/author/{{ author.slug }}" />
    <meta name="description" content="{{ author.description }}" />
    <meta name="keywords" content="{{ author.name }}" />
    <meta property="og:title" content="Posts by {{ author.name }} - {{ SITE_TITLE }}" />
    <meta property="og:description" content="{{ author.description }}" />
    <meta property="og:url" content="{{ SITE_URL }}/author/{{ author.slug }}" />
    <meta name="twitter:title" content="Posts by {{ author.name }} - {{ SITE_TITLE }}" />
    <meta name="twitter:description" content="{{ author.description }}" />
    <meta name="twitter:image" content="{{ author.avatar }}" />
    <meta property="og:image" content="{{ author.avatar }}" />
    <meta name="twitter:card" content="summary" />
{% elif is_author %}
    {% comment %} author list {% endcomment %}
    <link rel="canonical" href="{{ SITE_URL }}/author/" />
    <meta name="description" content="a pantheon of authors" />
    <meta property="og:title" content="Authors - {{ SITE_TITLE }}" />
    <meta property="og:description" content="a pantheon of authors" />
    <meta property="og:url" content="{{ SITE_URL }}/author/" />
    <meta name="twitter:title" content="Authors - {{ SITE_TITLE }}" />
    <meta name="twitter:description" content="a pantheon of authors" />
    <meta name="twitter:card" content="summary_large_image" />
{% endif %}


{% if is_repo_page and file %}
    <link rel="canonical" href="{{ SITE_URL }}/ssg/{{ file.path }}" />
    <meta name="description" content="Source Code for the goeshard.org static site generator" />
    <meta name="og:description" content="Source Code for the goeshard.org static site generator" />
    <meta name="og:url" content="{{ SITE_URL }}/ssg/{{ file.path }}" />
    <meta property="og:title" content="/ssg/{{ file.path }} | {{ SITE_TITLE }}" />
    <meta property="twitter:title" content="/ssg/{{ file.path }} | {{ SITE_TITLE }}" />
    <meta name="twitter:card" content="summary_large_image" />
{% elif is_repo_page %}
    <link rel="canonical" href="{{ SITE_URL }}/ssg/" />
    <meta name="description" content="Source Code for the goeshard.org static site generator" />
    <meta name="og:description" content="Source Code for the goeshard.org static site generator" />
    <meta name="og:url" content="{{ SITE_URL }}/ssg/" />
    <meta property="og:title" content="/ssg/| {{ SITE_TITLE }}" />
    <meta property="twitter:title" content="/ssg/ | {{ SITE_TITLE }}" />
    <meta name="twitter:card" content="summary_large_image" />
{% endif %}