xml escape SEO

This commit is contained in:
sakrecoer 2020-08-03 00:11:26 +02:00
parent ff486e449f
commit 42c8881d7e

View file

@ -28,9 +28,9 @@
{% if page.collection == 'tracks' %}
<!-- BEGIN seo.html -->
<title>Play {{ page.common.title }} by {{ page.common.artist }} | {{ site.title }}</title>
<meta name="title" content="Play &quot;{{ page.common.title| strip_html }}&quot; by {{ page.common.artist }}" />
<meta name="description" content="A track by {{ page.common.artist }} named &quot;{{ page.common.title | strip_html }}&quot; published on {{ site.title }}" />
<title>Play {{ page.common.title | xml_escape }} by {{ page.common.artist | xml_escape }} | {{ site.title | xml_escape }}</title>
<meta name="title" content="Play &quot;{{ page.common.title | xml_escape }}&quot; by {{ page.common.artist | xml_escape }}" />
<meta name="description" content="A track by {{ page.common.artist | xml_escape }} named &quot;{{ page.common.title | xml_escape }}&quot; published on {{ site.title | xml_escape }}" />
<meta name="dc.date.modified" scheme="ISO8601" content="{{ page.last_modified_at | date_to_xmlschema }}" />
<meta name="robots" content="index" />
@ -40,31 +40,31 @@
<meta name="geo.placename" content="{{ site.geo.town }}" />
<meta name="geo.position" content="{{ site.geo.lat }};{{ site.geo.long }}" />
<meta name="ICBM" content="{{ site.geo.lat }}, {{ site.geo.long }}" />
<meta name="author" content="{{ site.title }}" />
<meta name="author" content="{{ site.title | xml_escape }}" />
<meta name="generator" content="Jekyll v4.0.0" />
<!-- Dublin Core basic info -->
<meta name="dcterms.Identifier" content="{{ site.url }}" />
<meta name="dcterms.Format" content="text/html" />
<meta name="dcterms.Relation" content="{{ site.title }}" />
<meta name="dcterms.Publisher" content="{{ site.publisher.name }}" />
<meta name="dcterms.Relation" content="{{ site.title | xml_escape }}" />
<meta name="dcterms.Publisher" content="{{ site.publisher.name | xml_escape }}" />
<meta name="dcterms.Type" content="text/html" />
<meta name="dcterms.Coverage" content="{{ site.url }}/" />
<meta name="dcterms.Rights" content="Copyright &copy;{{ site.time | date: '%Y' }} {{ site.title }}." />
<meta name="dcterms.Subject" content="A track by {{ page.common.artist }} named &quot;{{ page.common.title| strip_html }}&quot; published on {{ site.title }}" />
<meta name="dcterms.Title" content="Play &quot;{{ page.common.title| strip_html }}&quot; by {{ page.common.artist }}" />
<meta name="dcterms.Contributor" content="{{ site.title }}" />
<meta name="dcterms.Subject" content="A track by {{ page.common.artist | xml_escape }} named &quot;{{ page.common.title | xml_escape }}&quot; published on {{ site.title | xml_escape }}" />
<meta name="dcterms.Title" content="Play &quot;{{ page.common.title | xml_escape }}&quot; by {{ page.common.artist | xml_escape }}" />
<meta name="dcterms.Contributor" content="{{ site.title | xml_escape }}" />
<meta name="dcterms.Date" content="{{ page.last_modified_at | date: '%Y-%m-%d' }}" />
<meta name="dcterms.Description" content="Listen and to a track by {{ page.common.artist | strip_html }} from the release &quot;{{ page.common.album | strip_html }}&quot; and support your remote artist!" />
<meta name="dcterms.Description" content="Listen and to a track by {{ page.common.artist | xml_escape }} from the release &quot;{{ page.common.album | xml_escape }}&quot; and support your remote artist!" />
<!-- Facebook -->
<meta property="og:title" content="{{ page.common.title }}" />
<meta property="og:title" content="{{ page.common.title | xml_escape }}" />
<meta property="og:locale" content="en" />
<meta property="og:description" content="Listen and to a track by {{ page.common.artist | strip_html }} from the release &quot;{{ page.common.album | strip_html }}&quot; and support your remote artist!" />
<meta property="og:description" content="Listen and to a track by {{ page.common.artist | xml_escape }} from the release &quot;{{ page.common.album | xml_escape }}&quot; and support your remote artist!" />
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:site_name" content="{{ site.title | xml_escape }}" />
<meta property="og:type" content="music:album:track" />
<meta property="og:audio" content="{{ site.mediaurl }}/{{ page.slug }}.mp3" />
<meta property="article:published_time" content="{{ page.last_modified_at | date_to_xmlschema }}" />
@ -72,8 +72,8 @@
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{{ page.common.title }} | {{ site.title }}" />
<meta name="twitter:description" content="Listen and to a track by {{ page.common.artist | strip_html }} from the release &quot;{{ page.common.album | strip_html }}&quot; and support your remote artist!" />
<meta name="twitter:title" content="{{ page.common.title | xml_escape }} | {{ site.title | xml_escape }}" />
<meta name="twitter:description" content="Listen and to a track by {{ page.common.artist | xml_escape }} from the release &quot;{{ page.common.album | xml_escape }}&quot; and support your remote artist!" />
<meta name="twitter:image" content="{{ site.mediaurl }}/{{ page.slug }}.jpeg" />
@ -86,9 +86,9 @@
{% capture namelist %}{% for art in album.artists %}{{ art }}{% unless forloop.last %}, {% endunless %}{% endfor %}{% endcapture %}
{% capture artist %}{{ namelist }}{% endcapture %}
<title>Play &quot;{{ album.name }}&quot; by {{ artist | uniq }} | {{ site.title }}</title>
<meta name="title" content="Play &quot;{{ album.name | strip_html }}&quot; by {{ artist | uniq }}" />
<meta name="description" content="A release by {{ artist | uniq }} named &quot;{{ album.name | strip_html }}&quot; published on {{ site.title }}" />
<title>Play &quot;{{ album.name | xml_escape }}&quot; by {{ artist | xml_escape | uniq }} | {{ site.title | xml_escape }}</title>
<meta name="title" content="Play &quot;{{ album.name | xml_escape }}&quot; by {{ artist | xml_escape | uniq }}" />
<meta name="description" content="A release by {{ artist | xml_escape | uniq }} named &quot;{{ album.name | xml_escape }}&quot; published on {{ site.title | xml_escape }}" />
<meta name="dc.date.modified" scheme="ISO8601" content="{{ page.last_modified_at | date_to_xmlschema }}" />
<meta name="robots" content="index" />
@ -98,31 +98,31 @@
<meta name="geo.placename" content="{{ site.geo.town }}" />
<meta name="geo.position" content="{{ site.geo.lat }};{{ site.geo.long }}" />
<meta name="ICBM" content="{{ site.geo.lat }}, {{ site.geo.long }}" />
<meta name="author" content="{{ site.title }}" />
<meta name="author" content="{{ site.title | xml_escape }}" />
<meta name="generator" content="Jekyll v4.0.0" />
<!-- Dublin Core basic info -->
<meta name="dcterms.Identifier" content="{{ site.url }}" />
<meta name="dcterms.Format" content="text/html" />
<meta name="dcterms.Relation" content="{{ site.title }}" />
<meta name="dcterms.Publisher" content="{{ site.publisher.name }}" />
<meta name="dcterms.Relation" content="{{ site.title | xml_escape }}" />
<meta name="dcterms.Publisher" content="{{ site.publisher.name | xml_escape }}" />
<meta name="dcterms.Type" content="text/html" />
<meta name="dcterms.Coverage" content="{{ site.url }}/" />
<meta name="dcterms.Rights" content="Copyright &copy;{{ site.time | date: '%Y' }} {{ site.title }}." />
<meta name="dcterms.Subject" content="A release by {{ artist | uniq }} named &quot;{{ album.name | strip_html }}&quot; published on {{ site.title }}" />
<meta name="dcterms.Title" content="Play &quot;{{ album.name | strip_html }}&quot; by {{ artist | uniq }}" />
<meta name="dcterms.Contributor" content="{{ site.title }}" />
<meta name="dcterms.Subject" content="A release by {{ artist | xml_escape | uniq }} named &quot;{{ album.name | xml_escape }}&quot; published on {{ site.title | xml_escape }}" />
<meta name="dcterms.Title" content="Play &quot;{{ album.name | xml_escape }}&quot; by {{ artist | xml_escape | uniq }}" />
<meta name="dcterms.Contributor" content="{{ site.title | xml_escape }}" />
<meta name="dcterms.Date" content="{{ page.last_modified_at | date: '%Y-%m-%d' }}" />
<meta name="dcterms.Description" content="Listen and to a release by {{ artist | uniq }} named &quot;{{ album.name | strip_html }}&quot; and support your remote artist!" />
<meta name="dcterms.Description" content="Listen and to a release by {{ artist | xml_escape | uniq }} named &quot;{{ album.name | xml_escape }}&quot; and support your remote artist!" />
<!-- Facebook -->
<meta property="og:title" content="{{ album.name }} by {{ artist | uniq }}" />
<meta property="og:title" content="{{ album.name | xml_escape }} by {{ artist | xml_escape | uniq }}" />
<meta property="og:locale" content="en" />
<meta property="og:description" content="Listen and to a release by {{ artist | uniq }} named &quot;{{ album.name | strip_html }}&quot; and support your remote artist!" />
<meta property="og:description" content="Listen and to a release by {{ artist | xml_escape | uniq }} named &quot;{{ album.name | xml_escape }}&quot; and support your remote artist!" />
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:site_name" content="{{ site.title | xml_escape }}" />
<meta property="og:type" content="music:album" />
{% for track in album.tracks %}<meta property="og:audio" content="{{ site.mediaurl }}/{{ track.albumSlug }}/{{ track.trackSlug }}.mp3" />{% endfor %}
<meta property="article:published_time" content="{{ page.last_modified_at | date_to_xmlschema }}" />
@ -131,14 +131,15 @@
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{{ album.name }} | {{ site.title }}" />
<meta name="twitter:description" content="Listen and to a release by {{ artist | uniq }} named &quot;{{ album.name | strip_html }}&quot; and support your remote artist!" />
<meta name="twitter:title" content="{{ album.name | xml_escape }} | {{ site.title | xml_escape }}" />
<meta name="twitter:description" content="Listen and to a release by {{ artist | uniq }} named &quot;{{ album.name | xml_escape }}&quot; and support your remote artist!" />
<meta name="twitter:image" content="{{ site.mediaurl }}/{{ album.tracks[0].slug }}.jpeg" />
{% endif %}{% endfor %}{% else %}
{% endif %}{% endfor %}
{% elsif page.category == 'ramblings' %}
<!-- BEGIN seo.html -->
<title>{{ page.title }} | {{ site.title }}</title>
<meta name="title" content="{{ page.title }} | {{ site.title }}" />
<meta name="title" content="{{ page.title | xml_escape }} | {{ site.title | xml_escape }}" />
<meta name="description" content="{{ page.description }}" />
<meta name="dc.date.modified" scheme="ISO8601" content="{{ page.last_modified_at | date_to_xmlschema }}" />
<meta name="robots" content="index" />
@ -156,32 +157,32 @@
<meta name="dcterms.Identifier" content="{{ site.url }}" />
<meta name="dcterms.Format" content="text/html" />
<meta name="dcterms.Relation" content="{{ site.title }}" />
<meta name="dcterms.Publisher" content="{{ site.publisher.name }}" />
<meta name="dcterms.Relation" content="{{ site.title | xml_escape }}" />
<meta name="dcterms.Publisher" content="{{ site.publisher.name | xml_escape }}" />
<meta name="dcterms.Type" content="text/html" />
<meta name="dcterms.Coverage" content="{{ site.url }}/" />
<meta name="dcterms.Rights" content="Copyright &copy;{{ site.time | date: '%Y' }} {{ site.title }}." />
<meta name="dcterms.Subject" content="{{ page.description }}" />
<meta name="dcterms.Title" content="{{ page.title }}" />
<meta name="dcterms.Contributor" content="{{ site.title }}" />
<meta name="dcterms.Subject" content="{{ page.description | xml_escape }}" />
<meta name="dcterms.Title" content="{{ page.title | xml_escape }}" />
<meta name="dcterms.Contributor" content="{{ site.title | xml_escape }}" />
<meta name="dcterms.Date" content="{{ page.last_modified_at | date: '%Y-%m-%d' }}" />
<meta name="dcterms.Description" content="{{ page.description }}" />
<meta name="dcterms.Description" content="{{ page.description | xml_escape }}" />
<!-- Facebook -->
<meta property="og:title" content="{{ page.title }} | {{ site.title }}" />
<meta property="og:title" content="{{ page.title | xml_escape }} | {{ site.title | xml_escape }}" />
<meta property="og:locale" content="en" />
<meta property="og:description" content="{{ page.description }}" />
<meta property="og:description" content="{{ page.description | xml_escape }}" />
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:site_name" content="{{ site.title | xml_escape }}" />
<meta property="og:type" content="webpage" />
<meta property="article:published_time" content="{{ page.last_modified_at | date_to_xmlschema }}" />
<meta property="og:image" content="{{ site.url }}{{ page.image }}" />
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{{ page.name }} | {{ site.title }}" />
<meta name="twitter:description" content="{{ page.description }}" />
<meta name="twitter:title" content="{{ page.title | xml_escape }} | {{ site.title | xml_escape }}" />
<meta name="twitter:description" content="{{ page.description | xml_escape }}" />
<meta name="twitter:image" content="{{ site.url }}{{ page.image }}" />
@ -192,14 +193,14 @@
{
"@context": "http://www.schema.org",
"@type": "Organization",
"name": "{{ site.title }}",
"url": "{{ site.url }}",
"name": "{{ site.title | xml_escape }}",
"url": "{{ site.url | xml_escape }}",
"sameAs": [
{% for social in site.social.links %}"{{ social }}"{% unless forloop.last %},{% endunless %}{% endfor %}
],
"logo": "{{ site.url }}/siteicon.png",
"image": "{{ site.url }}{{ page.image }}",
"description": "{{ site.description | strip_html }}",
"description": "{{ site.description | xml_escape }}",
"address": {
"@type": "PostalAddress",
"addressLocality": "{{ site.geo.town }}",
@ -210,6 +211,81 @@
}
</script>
{% endif %}
{% else %}
<!-- BEGIN seo.html -->
<title>{{ page.title }} | {{ site.title }}</title>
<meta name="title" content="{{ page.title | xml_escape }} | {{ site.title | xml_escape }}" />
<meta name="description" content="{{ page.description }}" />
<meta name="dc.date.modified" scheme="ISO8601" content="{{ page.last_modified_at | date_to_xmlschema }}" />
<meta name="robots" content="index" />
<link rel="canonical" href="{{ site.url }}{{ page.url }}" />
<link rel="alternate" hreflang="x-default" href="{{ site.url }}{{ page.url }}" />
<meta name="geo.region" content="{{ site.geo.region }}" />
<meta name="geo.placename" content="{{ site.geo.town }}" />
<meta name="geo.position" content="{{ site.geo.lat }};{{ site.geo.long }}" />
<meta name="ICBM" content="{{ site.geo.lat }}, {{ site.geo.long }}" />
<meta name="author" content="{{ site.title }}" />
<meta name="generator" content="Jekyll v4.0.0" />
<!-- Dublin Core basic info -->
<meta name="dcterms.Identifier" content="{{ site.url }}" />
<meta name="dcterms.Format" content="text/html" />
<meta name="dcterms.Relation" content="{{ site.title | xml_escape }}" />
<meta name="dcterms.Publisher" content="{{ site.publisher.name | xml_escape }}" />
<meta name="dcterms.Type" content="text/html" />
<meta name="dcterms.Coverage" content="{{ site.url }}/" />
<meta name="dcterms.Rights" content="Copyright &copy;{{ site.time | date: '%Y' }} {{ site.title }}." />
<meta name="dcterms.Subject" content="{{ page.description | xml_escape }}" />
<meta name="dcterms.Title" content="{{ page.title | xml_escape }}" />
<meta name="dcterms.Contributor" content="{{ site.title | xml_escape }}" />
<meta name="dcterms.Date" content="{{ page.last_modified_at | date: '%Y-%m-%d' }}" />
<meta name="dcterms.Description" content="{{ page.description | xml_escape }}" />
<!-- Facebook -->
<meta property="og:title" content="{{ page.title | xml_escape }} | {{ site.title | xml_escape }}" />
<meta property="og:locale" content="en" />
<meta property="og:description" content="{{ page.description | xml_escape }}" />
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
<meta property="og:site_name" content="{{ site.title | xml_escape }}" />
<meta property="og:type" content="webpage" />
<meta property="article:published_time" content="{{ page.last_modified_at | date_to_xmlschema }}" />
<meta property="og:image" content="{{ site.url }}{{ page.image }}" />
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{{ page.title | xml_escape }} | {{ site.title | xml_escape }}" />
<meta name="twitter:description" content="{{ page.description | xml_escape }}" />
<meta name="twitter:image" content="{{ site.url }}{{ page.image }}" />
<script type='application/ld+json'>
{
"@context": "http://www.schema.org",
"@type": "Organization",
"name": "{{ site.title | xml_escape }}",
"url": "{{ site.url | xml_escape }}",
"sameAs": [
{% for social in site.social.links %}"{{ social }}"{% unless forloop.last %},{% endunless %}{% endfor %}
],
"logo": "{{ site.url }}/siteicon.png",
"image": "{{ site.url }}{{ page.image }}",
"description": "{{ site.description | xml_escape }}",
"address": {
"@type": "PostalAddress",
"addressLocality": "{{ site.geo.town }}",
"addressRegion": "{{ site.geo.region }}",
"postalCode": "{{ site.geo.postalcode }}",
"addressCountry": "{{ site.geo.country }}"
}
}
</script>
{% endif %}
<link rel="alternate" type="application/rss+xml" href="{{ site.url}}/feed.xml" title="{{ site.title }}" />