Skip to content

Commit

Permalink
patching site.baseurl issues from pages-gem/issues/460
Browse files Browse the repository at this point in the history
  • Loading branch information
maptopixel committed Feb 6, 2018
1 parent 11d8ab5 commit 21c1cd2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

<div class="page">
<h1 class="page-title">404: Page not found</h1>
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ site.baseurl }}">Head back home</a> to try finding it again.</p>
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ "/" | relative_url }}">Head back home</a> to try finding it again.</p>
</div>
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ author:
url: https://nottingham.ac.uk/research/groups/lucas/index.aspx
email: lucas-info@nottingham.ac.uk

paginate: 1
paginate: 5

# Custom vars
version: 2.1.0
Expand All @@ -29,4 +29,5 @@ github:
repo: https://github.com/lucas-uk/

gems:
- jekyll-paginate
- jekyll-seo-tag
2 changes: 1 addition & 1 deletion _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>
</div>

<nav class="sidebar-nav">
<a class="sidebar-nav-item{% if page.url == site.baseurl %} active{% endif %}" href="https://lucas-uk.github.io">Home</a>
<a class="sidebar-nav-item{% if page.url == "/" | relative_url %} active{% endif %}" href="https://lucas-uk.github.io">Home</a>

{% comment %}
The code below dynamically generates a sidebar nav of pages with
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ <h1 class="post-title">

<div class="pagination">
{% if paginator.next_page %}
<a class="pagination-item older" href="{{ site.baseurl }}page{{paginator.next_page}}">Older</a>
<a class="pagination-item older" href="{{ "/" | relative_url }}page{{paginator.next_page}}">Older</a>
{% else %}
<span class="pagination-item older">Older</span>
{% endif %}
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<a class="pagination-item newer" href="{{ site.baseurl }}">Newer</a>
<a class="pagination-item newer" href="{{ "/" | relative_url }}">Newer</a>
{% else %}
<a class="pagination-item newer" href="{{ site.baseurl }}page{{paginator.previous_page}}">Newer</a>
<a class="pagination-item newer" href="{{ "/" | relative_url }}page{{paginator.previous_page}}">Newer</a>
{% endif %}
{% else %}
<span class="pagination-item newer">Newer</span>
Expand Down

0 comments on commit 21c1cd2

Please sign in to comment.