mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-18 09:22:53 +00:00
fix json ld
This commit is contained in:
+13
-1
@@ -3,7 +3,19 @@
|
||||
description %} {% block canonical %}{{ section.permalink }}{% endblock canonical %} {% block og_title
|
||||
%}{{ section.title }} | {{ config.title }}{% endblock og_title %} {% block og_description %}Chronological
|
||||
archive of every post on {{ config.title }}.{% endblock og_description %} {% block og_url %}{{
|
||||
section.permalink }}{% endblock og_url %} {% block content %}
|
||||
section.permalink }}{% endblock og_url %} {% block head %}
|
||||
<!-- SEO: BreadcrumbList JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ config.base_url | safe }}/" },
|
||||
{ "@type": "ListItem", "position": 2, "name": {{ section.title | json_encode | safe }}, "item": "{{ section.permalink | safe }}" }
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{% endblock head %} {% block content %}
|
||||
<div class="post-detail">
|
||||
<header class="post-header list-page-header">
|
||||
<h1 class="post-title list-page-title">{{ config.extra.archive_page_title | default(value="Archive") }}</h1>
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<meta name="theme-color" content="#131311">
|
||||
|
||||
{% if config.extra.google_site_verification %}
|
||||
<meta name="google-site-verification" content="{{ config.extra.google_site_verification }}">
|
||||
{% endif %}
|
||||
|
||||
<!-- Canonical URL -->
|
||||
<link rel="canonical" href="{% block canonical %}{{ config.base_url }}/{% endblock canonical %}">
|
||||
|
||||
|
||||
+50
-2
@@ -8,8 +8,10 @@
|
||||
{% block og_title %}{{ page.title }}{% endblock og_title %}
|
||||
{% block og_description %}{{ page.description | default(value=config.description) }}{% endblock og_description %}
|
||||
{% block og_url %}{{ page.permalink }}{% endblock og_url %}
|
||||
{% block og_type %}article{% endblock og_type %}
|
||||
{% block og_type %}{% if page.ancestors is containing("posts/_index.md") %}article{% else %}website{% endif %}{% endblock og_type %}
|
||||
{% block og_image %}{{ config.base_url }}{{ page.extra.image | default(value="/images/og-image.png") }}{% endblock og_image %}
|
||||
{% block og_extra %}
|
||||
{% if page.ancestors is containing("posts/_index.md") %}
|
||||
{% if page.date %}<meta property="article:published_time" content="{{ page.date | date(format="%+") }}">{% endif %}
|
||||
{% if page.updated %}<meta property="article:modified_time" content="{{ page.updated | date(format="%+") }}">{% endif %}
|
||||
<meta property="article:author" content="{{ config.extra.author | default(value="andwati") }}">
|
||||
@@ -18,13 +20,16 @@
|
||||
<meta property="article:tag" content="{{ tag }}">
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock og_extra %}
|
||||
|
||||
{# Twitter Card overrides #}
|
||||
{% block twitter_title %}{{ page.title }}{% endblock twitter_title %}
|
||||
{% block twitter_description %}{{ page.description | default(value=config.description) }}{% endblock twitter_description %}
|
||||
{% block twitter_image %}{{ config.base_url }}{{ page.extra.image | default(value="/images/og-image.png") }}{% endblock twitter_image %}
|
||||
|
||||
{% block head %}
|
||||
{% if page.ancestors is containing("posts/_index.md") %}
|
||||
<!-- SEO: BlogPosting JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
@@ -37,7 +42,7 @@
|
||||
},
|
||||
"headline": {{ page.title | json_encode | safe }},
|
||||
"description": {{ page.description | default(value=config.description) | json_encode | safe }},
|
||||
"image": "{{ config.base_url | safe }}/images/og-image.png",
|
||||
"image": "{{ config.base_url | safe }}{{ page.extra.image | default(value="/images/og-image.png") | safe }}",
|
||||
"url": "{{ page.permalink | safe }}",
|
||||
"inLanguage": "en-US",
|
||||
{% if page.date %}"datePublished": "{{ page.date | date(format="%+") }}",{% endif %}
|
||||
@@ -66,6 +71,49 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- SEO: BreadcrumbList JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ config.base_url | safe }}/" },
|
||||
{ "@type": "ListItem", "position": 2, "name": "Posts", "item": "{{ config.base_url | safe }}/posts/" },
|
||||
{ "@type": "ListItem", "position": 3, "name": {{ page.title | json_encode | safe }}, "item": "{{ page.permalink | safe }}" }
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{% else %}
|
||||
<!-- SEO: WebPage JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ page.permalink | safe }}",
|
||||
"name": {{ page.title | json_encode | safe }},
|
||||
"description": {{ page.description | default(value=config.description) | json_encode | safe }},
|
||||
"url": "{{ page.permalink | safe }}",
|
||||
"inLanguage": "en-US",
|
||||
"isPartOf": {
|
||||
"@type": "WebSite",
|
||||
"@id": "{{ config.base_url | safe }}/#website"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- SEO: BreadcrumbList JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ config.base_url | safe }}/" },
|
||||
{ "@type": "ListItem", "position": 2, "name": {{ page.title | json_encode | safe }}, "item": "{{ page.permalink | safe }}" }
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if page.extra.math %}
|
||||
<link rel="stylesheet" href="{{ get_url(path="css/katex/katex.min.css") }}">
|
||||
<script defer src="{{ get_url(path="js/katex/katex.min.js") }}"></script>
|
||||
|
||||
+13
-1
@@ -30,7 +30,7 @@ og_description %}{{ config.extra.posts_page_subtitle | default(value="Exploring
|
||||
"@type": "BlogPosting",
|
||||
"@id": "{{ page.permalink | safe }}#article",
|
||||
"headline": {{ page.title | json_encode | safe }},
|
||||
"image": "{{ config.base_url | safe }}/images/og-image.png",
|
||||
"image": "{{ config.base_url | safe }}{{ page.extra.image | default(value="/images/og-image.png") | safe }}",
|
||||
"url": "{{ page.permalink | safe }}"
|
||||
{% if page.date %},"datePublished": "{{ page.date | date(format="%+") }}"{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
@@ -39,6 +39,18 @@ og_description %}{{ config.extra.posts_page_subtitle | default(value="Exploring
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- SEO: BreadcrumbList JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ config.base_url | safe }}/" },
|
||||
{ "@type": "ListItem", "position": 2, "name": {{ posts_page_title | json_encode | safe }}, "item": "{{ config.base_url | safe }}/posts/" }
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Pagination link hints for crawlers -->
|
||||
{% if paginator.previous %}<link rel="prev" href="{{ paginator.previous }}" />{% endif %} {% if
|
||||
paginator.next %}<link rel="next" href="{{ paginator.next }}" />{% endif %} {% endblock head %} {%
|
||||
|
||||
@@ -17,6 +17,18 @@ og_description %} {% block og_url %}{{ config.base_url }}/tags/{% endblock og_ur
|
||||
"inLanguage": "en-US"
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- SEO: BreadcrumbList JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ config.base_url | safe }}/" },
|
||||
{ "@type": "ListItem", "position": 2, "name": "Tags", "item": "{{ config.base_url | safe }}/tags/" }
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{% endblock head %} {% block content %}
|
||||
<div class="tags-page">
|
||||
<header class="page-header tags-page-header">
|
||||
|
||||
@@ -26,7 +26,7 @@ term.permalink }}{% endblock og_url %} {% block head %}
|
||||
"@type": "BlogPosting",
|
||||
"@id": "{{ page.permalink | safe }}#article",
|
||||
"headline": {{ page.title | json_encode | safe }},
|
||||
"image": "{{ config.base_url | safe }}/images/og-image.png",
|
||||
"image": "{{ config.base_url | safe }}{{ page.extra.image | default(value="/images/og-image.png") | safe }}",
|
||||
"url": "{{ page.permalink | safe }}"
|
||||
{% if page.date %},"datePublished": "{{ page.date | date(format="%+") }}"{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
@@ -34,6 +34,19 @@ term.permalink }}{% endblock og_url %} {% block head %}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- SEO: BreadcrumbList JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "{{ config.base_url | safe }}/" },
|
||||
{ "@type": "ListItem", "position": 2, "name": "Tags", "item": "{{ config.base_url | safe }}/tags/" },
|
||||
{ "@type": "ListItem", "position": 3, "name": {{ term.name | json_encode | safe }}, "item": "{{ term.permalink | safe }}" }
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{% endblock head %} {% block content %}
|
||||
<div class="post-detail">
|
||||
<header class="post-header list-page-header">
|
||||
|
||||
Reference in New Issue
Block a user