Skip to content

Commit

Permalink
Worked out that for authors and tags relative paths need to be joined…
Browse files Browse the repository at this point in the history
… as in author-casper instead of using / delimiters.
biomadeira committed Oct 24, 2015
1 parent 95ec7ff commit a6d2192
Showing 7 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions _includes/author_pagination.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<nav class="pagination" role="pagination">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="newer-posts" href="{{ site.baseurl }}author/{{ site.username }}" title="Previous Page">&laquo; Newer Posts</a>
<a class="newer-posts" href="{{ site.baseurl }}author-{{ site.username }}" title="Previous Page">&laquo; Newer Posts</a>
{% else %}
<a class="newer-posts" href="{{ site.baseurl }}author/{{ site.username }}/page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Newer Posts</a>
<a class="newer-posts" href="{{ site.baseurl }}author-{{ site.username }}/author-page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Newer Posts</a>
{% endif %}
{% endif %}
<span class="page-number"> Page {{ paginator.page }} of {{ paginator.total_pages }} </span>
{% if paginator.next_page %}
<a class="older-posts" href="{{ site.baseurl }}author/{{ site.username }}/page{{ paginator.next_page }}/" title="Next Page">Older Posts &raquo;</a>
<a class="older-posts" href="{{ site.baseurl }}author-{{ site.username }}/author-page{{ paginator.next_page }}/" title="Next Page">Older Posts &raquo;</a>
{% endif %}
</nav>
6 changes: 3 additions & 3 deletions _includes/loop.html
Original file line number Diff line number Diff line change
@@ -25,15 +25,15 @@ <h2 class="post-title"><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title
<footer class="post-meta">
{% if site.image %}<img class="author-thumb" src="{{ site.baseurl }}{{ site.image }}" alt="Author image" nopin="nopin" />{% endif %}
<!-- author -->
<a href='{{ site.baseurl }}author/{{ site.username }}'>{{ site.author }}</a>
<a href='{{ site.baseurl }}author-{{ site.username }}'>{{ site.author }}</a>
<!-- [[tags prefix=" on "]] -->
{% if post.tags.size > 0 %}
on
{% for tag in post.tags %}
{% if forloop.index == post.tags.size %}
<a href='{{ site.baseurl }}tag/{{ tag }}'>{{ tag | capitalize }}</a>
<a href='{{ site.baseurl }}tag-{{ tag }}'>{{ tag | capitalize }}</a>
{% else %}
<a href='{{ site.baseurl }}tag/{{ tag }}'>{{ tag | capitalize }}</a>,
<a href='{{ site.baseurl }}tag-{{ tag }}'>{{ tag | capitalize }}</a>,
{% endif %}
{% endfor %}
{% endif %}
6 changes: 3 additions & 3 deletions _includes/tag_pagination.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<nav class="pagination" role="pagination">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="newer-posts" href="{{ site.baseurl }}tag/{{ page.tag }}" title="Previous Page">&laquo; Newer Posts</a>
<a class="newer-posts" href="{{ site.baseurl }}tag-{{ page.tag }}" title="Previous Page">&laquo; Newer Posts</a>
{% else %}
<a class="newer-posts" href="{{ site.baseurl }}tag/{{ page.tag }}/page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Newer Posts</a>
<a class="newer-posts" href="{{ site.baseurl }}tag-{{ page.tag }}/tag-page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Newer Posts</a>
{% endif %}
{% endif %}
<span class="page-number"> Page {{ paginator.page }} of {{ paginator.total_pages }} </span>
{% if paginator.next_page %}
<a class="older-posts" href="{{ site.baseurl }}tag/{{ page.tag }}/page{{ paginator.next_page }}/" title="Next Page">Older Posts &raquo;</a>
<a class="older-posts" href="{{ site.baseurl }}tag-{{ page.tag }}/tag-page{{ paginator.next_page }}/" title="Next Page">Older Posts &raquo;</a>
{% endif %}
</nav>
8 changes: 4 additions & 4 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -32,9 +32,9 @@ <h1 class="post-title">{{ page.title }}</h1>
on
{% for tag in page.tags %}
{% if forloop.index == page.tags.size %}
<a href='{{ site.baseurl }}tag/{{ tag }}'>{{ tag | capitalize }}</a>
<a href='{{ site.baseurl }}tag-{{ tag }}'>{{ tag | capitalize }}</a>
{% else %}
<a href='{{ site.baseurl }}tag/{{ tag }}'>{{ tag | capitalize }}</a>,
<a href='{{ site.baseurl }}tag-{{ tag }}'>{{ tag | capitalize }}</a>,
{% endif %}
{% endfor %}
{% endif %}
@@ -54,7 +54,7 @@ <h1 class="post-title">{{ page.title }}</h1>

{% if site.image %}
<figure class="author-image">
<a class="img" href="{{ site.baseurl }}author/{{ site.username }}" style="background-image: url({{ site.baseurl }}{{ site.image }})"><span class="hidden">{{ page.author }}'s Picture</span></a>
<a class="img" href="{{ site.baseurl }}author-{{ site.username }}" style="background-image: url({{ site.baseurl }}{{ site.image }})"><span class="hidden">{{ page.author }}'s Picture</span></a>
</figure>
{% endif %}

@@ -64,7 +64,7 @@ <h4><a href="{{ site.baseurl }}author/{{ site.username }}">{{ site.author }}</a>
{% if site.bio %}
<p> {{ site.bio }}</p>
{% else %}
<p>Read <a href="{{ site.baseurl }}author/{{ site.username }}">more posts</a> by this author.</p>
<p>Read <a href="{{ site.baseurl }}author-{{ site.username }}">more posts</a> by this author.</p>
{% endif %}
<div class="author-meta">
{% if site.location %}<span class="author-location icon-location"> {{ site.location }}</span>{% endif %}
2 changes: 1 addition & 1 deletion _layouts/tag.html
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
<header class="main-header {% if page.cover %}" style="background-image: url({{ site.baseurl }}{{ page.cover }}) {% else %}no-cover{% endif %}">
<nav class="main-nav overlay clearfix">
<a class="back-button icon-arrow-left" href="{{ site.baseurl }}">Home</a>
<a class="subscribe-button icon-feed" href="{{ site.baseurl }}tag/{{ page.tag }}/rss.xml">{{ page.tag }}</a>
<a class="subscribe-button icon-feed" href="{{ site.baseurl }}tag-{{ page.tag }}/rss.xml">{{ page.tag }}</a>
</nav>
<div class="vertical">
<div class="main-header-content inner">
6 changes: 3 additions & 3 deletions _plugins/autgenerator.rb
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ def build_subpages(site, type, posts)
end

def atomize(site, type, posts)
path = "/author/#{posts[0]}"
path = "/author-#{posts[0]}"
atom = AtomPageAuthor.new(site, site.source, path, type, posts[0], posts[1])
site.pages << atom
end
@@ -26,9 +26,9 @@ def paginate(site, type, posts)
pages = Jekyll::Paginate::Pager.calculate_pages(posts[1], site.config['paginate'].to_i)
(1..pages).each do |num_page|
pager = Jekyll::Paginate::Pager.new(site, num_page, posts[1], pages)
path = "/author/#{posts[0]}"
path = "/author-#{posts[0]}"
if num_page > 1
path = path + "/page#{num_page}"
path = path + "/author-page#{num_page}"
end
newpage = GroupSubPageAuthor.new(site, site.source, path, type, posts[0])
newpage.pager = pager
6 changes: 3 additions & 3 deletions _plugins/catgenerator.rb
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ def build_subpages(site, type, posts)
end

def atomize(site, type, posts)
path = "/tag/#{posts[0]}"
path = "/tag-#{posts[0]}"
atom = AtomPageTags.new(site, site.source, path, type, posts[0], posts[1])
site.pages << atom
end
@@ -26,9 +26,9 @@ def paginate(site, type, posts)
pages = Jekyll::Paginate::Pager.calculate_pages(posts[1], site.config['paginate'].to_i)
(1..pages).each do |num_page|
pager = Jekyll::Paginate::Pager.new(site, num_page, posts[1], pages)
path = "/tag/#{posts[0]}"
path = "/tag-#{posts[0]}"
if num_page > 1
path = path + "/page#{num_page}"
path = path + "/tag-page#{num_page}"
end
newpage = GroupSubPageTags.new(site, site.source, path, type, posts[0])
newpage.pager = pager

0 comments on commit a6d2192

Please sign in to comment.