mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
just ditch site.baseurl which solves all problems
This commit is contained in:
parent
73377a05ac
commit
5e59aa336f
@ -12,7 +12,7 @@
|
||||
|
||||
name: kremalicious
|
||||
description: 'Blog of designer & developer Matthias Kretschmann'
|
||||
baseurl: http://kremalicious.com
|
||||
url: http://kremalicious.com
|
||||
author: Matthias Kretschmann
|
||||
email: m@kretschmann.io
|
||||
|
||||
|
@ -2,6 +2,6 @@
|
||||
<aside class="comments">
|
||||
|
||||
<p>You should tweet this post</p>
|
||||
<p class="btn-wrap"><a class="btn twitter-share icon icon-twitter" target="_blank" href="https://twitter.com/intent/tweet?url={{ site.baseurl | cgi_escape }}{{ page.url | cgi_escape }}&text={{ page.title | cgi_escape }}&via=kremalicious&related=kremaliciouscom,ezeep">Tweet</a></p>
|
||||
<p class="btn-wrap"><a class="btn twitter-share icon icon-twitter" target="_blank" href="https://twitter.com/intent/tweet?url={{ site.url | cgi_escape }}{{ page.url | cgi_escape }}&text={{ page.title | cgi_escape }}&via=kremalicious&related=kremaliciouscom,ezeep">Tweet</a></p>
|
||||
|
||||
</aside>
|
@ -67,9 +67,9 @@
|
||||
|
||||
|
||||
<!-- Canonical URL -->
|
||||
<link rel="canonical" href="{{ site.baseurl}}{{ page.url | replace:'index.html','' }}">
|
||||
<link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">
|
||||
|
||||
<link rel="alternate" href="{{ site.baseurl }}/feed/" type="application/rss+xml" title="Posts Feed"/>
|
||||
<link rel="alternate" href="{{ site.url }}/feed/" type="application/rss+xml" title="Posts Feed"/>
|
||||
|
||||
<!-- Apple -->
|
||||
<meta name="apple-mobile-web-app-title" content="kremalicious">
|
||||
@ -87,7 +87,7 @@
|
||||
<link rel="icon" href="/favicon.ico" sizes="16x16">
|
||||
|
||||
<!-- Windows 8 Metro Tile Image -->
|
||||
<meta name="msapplication-TileImage" content="{{ site.baseurl }}/metro-tile.png"/>
|
||||
<meta name="msapplication-TileImage" content="{{ site.url }}/metro-tile.png"/>
|
||||
<meta name="msapplication-TileColor" content="#015565"/>
|
||||
|
||||
{% if paginator %}
|
||||
|
@ -7,7 +7,7 @@
|
||||
{% endif %}
|
||||
{% if page.title %}
|
||||
<meta content="article" property="og:type">
|
||||
<meta content="{{ site.baseurl }}/about/" property="article:author">
|
||||
<meta content="{{ site.url }}/about/" property="article:author">
|
||||
{% else %}
|
||||
<meta content="website" property="og:type">
|
||||
{% endif %}
|
||||
@ -19,15 +19,15 @@
|
||||
<meta content="{{ page.excerpt | strip_html | strip_newlines }}" property="og:description">
|
||||
{% endif %}
|
||||
{% if page.url %}
|
||||
<meta content="{{ site.baseurl}}{{ page.url | replace:'index.html','' }}" property="og:url">
|
||||
<meta content="{{ site.url}}{{ page.url | replace:'index.html','' }}" property="og:url">
|
||||
{% endif %}
|
||||
{% if page.date %}
|
||||
<meta content="{{ page.date | date_to_xmlschema }}" property="article:published_time">
|
||||
{% endif %}
|
||||
{% if page.image %}
|
||||
<meta content="{{ site.baseurl }}/media/{{ page.image }}" property="og:image">
|
||||
<meta content="{{ site.url }}/media/{{ page.image }}" property="og:image">
|
||||
{% else %}
|
||||
<meta content="{{ site.baseurl }}/kremalicious1024.png" property="og:image">
|
||||
<meta content="{{ site.url }}/kremalicious1024.png" property="og:image">
|
||||
{% endif %}
|
||||
{% if page.categories %}
|
||||
{% for category in page.categories limit:1 %}
|
||||
|
@ -12,7 +12,7 @@
|
||||
<meta name="twitter:title" content="{{ site.title }}">
|
||||
{% endif %}
|
||||
{% if page.url %}
|
||||
<meta name="twitter:url" content="{{ site.baseurl}}{{ page.url | replace:'index.html','' }}">
|
||||
<meta name="twitter:url" content="{{ site.url}}{{ page.url | replace:'index.html','' }}">
|
||||
{% endif %}
|
||||
{% if page.description %}
|
||||
<meta name="twitter:description" content="{{ page.description }}">
|
||||
@ -20,7 +20,7 @@
|
||||
<meta name="twitter:description" content="{{ page.excerpt | strip_html }}">
|
||||
{% endif %}
|
||||
{% if page.image %}
|
||||
<meta name="twitter:image:src" content="{{ site.baseurl }}/media/{{ page.image }}">
|
||||
<meta name="twitter:image:src" content="{{ site.url }}/media/{{ page.image }}">
|
||||
{% else %}
|
||||
<meta name="twitter:image:src" content="{{ site.baseurl }}/kremalicious1024.png">
|
||||
<meta name="twitter:image:src" content="{{ site.url }}/kremalicious1024.png">
|
||||
{% endif %}
|
@ -142,8 +142,7 @@ module Jekyll
|
||||
|
||||
# Generate resized images
|
||||
instance.each { |key, source|
|
||||
instance[key][:generated_src] = generate_image(source, site.source, site.dest, settings['source'], settings['output'])
|
||||
#instance[key][:generated_src] = generate_image(source, site.source, site.dest, settings['source'], settings['output'], site.config["baseurl"])
|
||||
instance[key][:generated_src] = generate_image(source, site.source, site.dest, settings['source'], settings['output'], site.config["baseurl"])
|
||||
}
|
||||
|
||||
# Construct and return tag
|
||||
@ -170,8 +169,7 @@ module Jekyll
|
||||
picture_tag
|
||||
end
|
||||
|
||||
def generate_image(instance, site_source, site_dest, image_source, image_dest)
|
||||
#def generate_image(instance, site_source, site_dest, image_source, image_dest, baseurl)
|
||||
def generate_image(instance, site_source, site_dest, image_source, image_dest, baseurl)
|
||||
image = MiniMagick::Image.open(File.join(site_source, image_source, instance[:src]))
|
||||
digest = Digest::MD5.hexdigest(image.to_blob).slice!(0..5)
|
||||
|
||||
@ -232,8 +230,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
# Return path relative to the site root for html
|
||||
Pathname.new(File.join('/', image_dest, image_dir, gen_name)).cleanpath
|
||||
#Pathname.new(File.join(baseurl, image_dest, image_dir, gen_name)).cleanpath
|
||||
Pathname.new(File.join(baseurl, image_dest, image_dir, gen_name)).cleanpath
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -8,10 +8,10 @@ redirect_from:
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
||||
<title type="text" xml:lang="en">{{ site.name }}</title>
|
||||
<link type="application/atom+xml" href="{{ site.baseurl }}/feed/" rel="self"/>
|
||||
<link type="text" href="{{ site.baseurl }}" rel="alternate"/>
|
||||
<link type="application/atom+xml" href="{{ site.url }}/feed/" rel="self"/>
|
||||
<link type="text" href="{{ site.url }}" rel="alternate"/>
|
||||
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
||||
<id>{{ site.baseurl }}</id>
|
||||
<id>{{ site.url }}</id>
|
||||
<author>
|
||||
<name>{{ site.author }}</name>
|
||||
</author>
|
||||
@ -23,7 +23,7 @@ redirect_from:
|
||||
<link>{{ post.linkurl | escape }}</link>
|
||||
{% else %}
|
||||
<title>{{ post.title | escape | titlecase }}</title>
|
||||
<link>{{ site.baseurl }}{{ post.url | escape }}</link>
|
||||
<link>{{ site.url }}{{ post.url | escape }}</link>
|
||||
{% endif %}
|
||||
|
||||
<published>{{ post.date | date_to_xmlschema }}</published>
|
||||
@ -34,17 +34,17 @@ redirect_from:
|
||||
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
||||
{% endif %}
|
||||
|
||||
<id>{{ site.baseurl }}{{ post.url | escape }}</id>
|
||||
<id>{{ site.url }}{{ post.url | escape }}</id>
|
||||
<content type="html">
|
||||
{% if post.image %}
|
||||
<img src="{{ site.baseurl }}/media/{{ post.image }}" />
|
||||
<img src="{{ site.url }}/media/{{ post.image }}" />
|
||||
{% endif %}
|
||||
|
||||
{{ post.content | xml_escape }}
|
||||
|
||||
{% if post.layout == "link" %}
|
||||
<a href="{{ post.linkurl | escape }}">Go to source &#187;</a> <br />
|
||||
<a href="{{ site.baseurl }}{{ post.url | escape }}" title="Permalink for this post">&#8734;</a>
|
||||
<a href="{{ site.url }}{{ post.url | escape }}" title="Permalink for this post">&#8734;</a>
|
||||
{% endif %}
|
||||
|
||||
<hr />
|
||||
|
@ -6,4 +6,4 @@ Disallow: /search/
|
||||
Disallow: /page/
|
||||
Disallow: /*/page/
|
||||
|
||||
Sitemap: {{ site.baseurl }}/sitemap.xml
|
||||
Sitemap: {{ site.url }}/sitemap.xml
|
Loading…
Reference in New Issue
Block a user