|
41 | 41 | <meta name="keywords" content="{%- if page.keywords -%}{{ page.keywords }}{%- else -%}{{ site.keywords }}{%- endif -%}" />
|
42 | 42 | {%- endif %}
|
43 | 43 |
|
44 |
| -{%- if site.serve_og_meta %} |
| 44 | +{%- assign is_blog_post = false -%} |
| 45 | +{%- if page.url != '/blog/index.html' and page.url contains '/blog/' -%} |
| 46 | + {%- unless page.url contains '/tag/' or page.url contains '/category/' -%} |
| 47 | + {%- assign is_blog_post = true -%} |
| 48 | + {%- endunless -%} |
| 49 | +{%- endif -%} |
45 | 50 |
|
| 51 | +{%- if site.serve_og_meta %} |
46 | 52 | <!-- OpenGraph -->
|
47 | 53 | <meta property="og:site_name" content="{{ title }}" />
|
48 |
| - <meta property="og:type" content="website" /> |
| 54 | + <meta property="og:type" content="{%- if is_blog_post -%}article{%- else -%}website{%- endif -%}" /> |
49 | 55 | <meta property="og:title" content="{%- if page.title -%}{{ title }} | {{ page.title }}{%- else -%}{{ title }}{%- endif -%}" />
|
50 | 56 | <meta property="og:url" content="{{ page.url | prepend: site.baseurl | prepend: site.url | remove_first: 'index.html' }}" />
|
51 | 57 | <meta property="og:description" content="{%- if page.description -%}{{ page.description }}{%- else -%}{{ site.description }}{%- endif -%}" />
|
|
193 | 199 | {%- endif -%}
|
194 | 200 |
|
195 | 201 | <script type="application/ld+json">
|
196 |
| - { |
| 202 | + { |
197 | 203 | "author":
|
198 | 204 | {
|
199 |
| - "@type": "Person", |
200 |
| - "name": "{{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}" |
| 205 | + "@type": "Person", |
| 206 | + "name": "{{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}" |
201 | 207 | },
|
202 | 208 | "url": "{{ page.url | prepend: site.baseurl | prepend: site.url }}",
|
203 |
| - "@type": "WebSite", |
| 209 | + "@type": "{%- if is_blog_post -%}BlogPosting{%- else -%}WebSite{%- endif -%}", |
204 | 210 | "description": "{%- if page.description -%}{{ page.description }}{%- else if site.description -%}{{ site.description }}{%- endif -%}",
|
205 | 211 | "headline": "{%- if page.title -%}{{ page.title }}{%- else -%}{{ site.title }}{%- endif -%}",
|
206 | 212 | {% if sameaslinks != blank -%}
|
207 | 213 | "sameAs": {{ sameaslinks }},
|
208 | 214 | {%- endif %}
|
209 | 215 | "name": "{{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}",
|
210 | 216 | "@context": "https://schema.org"
|
211 |
| - } |
| 217 | + } |
212 | 218 | </script>
|
213 | 219 | {%- endif %}
|
0 commit comments