Abs link patch (#506)
* Fix absolute URL generation url and baseurl config for this theme deviates from jekyll standard, and that results in double inclusion of project path if this theme is used as project page. Switching to Jekyll accepted url usage so that absolute_url filter works. * Alternate links need to be aboslute * mention url and baseurl only need to be modified in local dev * Update readme on new url/baseurl setting changes
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
<meta name="description" content="{{ page.subtitle }}">
|
||||
{% endif %}
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} {{ site.title-separator }} {{ site.description }}" href="{{ '/feed.xml' | relative_url }}" />
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} {{ site.title-separator }} {{ site.description }}" href="{{ '/feed.xml' | absolute_url }}" />
|
||||
|
||||
{% include gtag.html %}
|
||||
{% include gtm_head.html %}
|
||||
@ -78,17 +78,17 @@
|
||||
<meta property="og:type" content="website" />
|
||||
|
||||
{% if page.id %}
|
||||
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
|
||||
<link rel="canonical" href="{{ site.url }}{{ page.url }}" />
|
||||
<meta property="og:url" content="{{ page.url | absolute_url }}" />
|
||||
<link rel="canonical" href="{{ page.url | absolute_url }}" />
|
||||
{% else %}
|
||||
<meta property="og:url" content="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
|
||||
<link rel="canonical" href="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
|
||||
<meta property="og:url" content="{{ page.url | absolute_url | strip_index }}" />
|
||||
<link rel="canonical" href="{{ page.url | absolute_url | strip_index }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if page.share-img %}
|
||||
<meta property="og:image" content="{{ page.share-img }}" />
|
||||
{% elsif site.avatar %}
|
||||
<meta property="og:image" content="{{ site.url }}{{ site.avatar }}" />
|
||||
<meta property="og:image" content="{{ site.avatar | absolute_url }}" />
|
||||
{% endif %}
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
{% if page.share-img %}
|
||||
<meta name="twitter:image" content="{{ page.share-img }}" />
|
||||
{% elsif site.avatar %}
|
||||
<meta name="twitter:image" content="{{ site.url }}{{ site.avatar }}" />
|
||||
<meta name="twitter:image" content="{{ site.avatar | absolute_url }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if site.matomo %}
|
||||
|
Reference in New Issue
Block a user