Configure baseurl

This commit is contained in:
Chester How 2017-10-08 02:50:44 +08:00
parent 00d4d90f62
commit e06bbeaa03
6 changed files with 10 additions and 10 deletions

View File

@ -31,7 +31,7 @@ To test your site locally, run this in your site's root directory
$ jekyll serve --watch
```
Head to http://localhost:4000 to see your site in action.
Head to http://localhost:4000/tale/ to see your site in action.
## Contributing
Found a bug or have a suggestion? Feel free to create an issue or make a pull request!

View File

@ -4,8 +4,8 @@ permalink: /:year-:month-:day/:title
# Setup
title: Tale
paginate: 5
baseurl: ""
url: "https://chesterhow.github.io/tale"
baseurl: "/tale"
url: "https://chesterhow.github.io"
# Assets
sass:

View File

@ -10,7 +10,7 @@
<h2 class="nav-title">{{ site.title }}</h2>
</a>
<ul>
<li><a href="{{ '/about' | prepend: site.url }}">About</a></li>
<li><a href="{{ '/about' | prepend: site.baseurl }}">About</a></li>
<li><a href="{{ site.baseurl }}/">Posts</a></li>
</ul>
</div>

View File

@ -21,10 +21,10 @@ layout: default
<div class="pagination">
{% if page.next.url %}
<a href="{{ page.next.url | prepend: site.url }}" class="left arrow">&#8592;</a>
<a href="{{ page.next.url | prepend: site.baseurl }}" class="left arrow">&#8592;</a>
{% endif %}
{% if page.previous.url %}
<a href="{{ page.previous.url | prepend: site.url }}" class="right arrow">&#8594;</a>
<a href="{{ page.previous.url | prepend: site.baseurl }}" class="right arrow">&#8594;</a>
{% endif %}
<a href="#" class="top">Top</a>

View File

@ -13,7 +13,7 @@ Tale is minimal [Jekyll](https://jekyllrb.com/) theme curated for storytellers.
- Markdown and HTML text formatting
- Pagination of posts
Head over to the [Example Content]({{ site.url }}/2017-03-16/example-content) post for a showcase of Tale's text formatting features.
Head over to the [Example Content]({{ site.baseurl }}/2017-03-16/example-content) post for a showcase of Tale's text formatting features.
## Browser Support
Tale works on most if not all modern browsers, including Chrome, Safari and Firefox 👍🏼

View File

@ -5,7 +5,7 @@ title: Home
<div class="catalogue">
{% for post in paginator.posts %}
<a href="{{ post.url | prepend: site.url }}" class="catalogue-item">
<a href="{{ post.url | prepend: site.baseurl }}" class="catalogue-item">
<div>
<time datetime="{{ post.date }}" class="catalogue-time">{{ post.date | date: "%B %d, %Y" }}</time>
<h1 class="catalogue-title">{{ post.title }}</h1>
@ -22,10 +22,10 @@ title: Home
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.url }}" class="left arrow">&#8592;</a>
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="left arrow">&#8592;</a>
{% endif %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.url }}" class="right arrow">&#8594;</a>
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="right arrow">&#8594;</a>
{% endif %}
<span>{{ paginator.page }}</span>