New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listing blog posts in a separated 'Blog' page #164

Closed
eduardocoelho opened this Issue May 21, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@eduardocoelho

eduardocoelho commented May 21, 2015

Hi,
First I'd like to thank you for your Jekyll theme, I'm using it on my personal website www.educoelho.com and it works great! Now I'd like to create some blog posts but haven't found out how to show it in a separated 'Blog' page.

I took a look at your sample code and realized that the template works fine when showing the blog posts in the 'index.html' (the website main page). However I'd like to have the index.html showing my personal information and show the blog posts in a 'Blog' page instead (just like the 'Curriculum' or 'Past' in my website).

The steps I've done so far are as follows:

  1. Added <a href="{{ site.baseurl }}/blog/">Blog</a> to the _includes/navigation.html
  2. Created a sample blog post in _posts/2015-05-21-first-blog-post.md with the following content:

---
layout:     post
title:      My first blog post
date:       2015-05-21 15:20:00
summary:    This is an empty post to illustrate the pagination component with Pixyll.
categories: blog post bash

---

This is my first blog post with jekyll.

Then, when I rebuild the website I got the following warning message: "Pagination: Pagination is enabled, but I couldn't find an index.html page to use as the pagination template. Skipping pagination."

Could you give me some guidance on that?
Thanks.

@dwlfrth

This comment has been minimized.

dwlfrth commented May 21, 2015

@eduardocoelho
You may want to add the following parameter to _config.yml: paginate_path: "blog/page:num"
Also, make sure to adapt _includes/pagination.html accordingly :)

@eduardocoelho

This comment has been minimized.

eduardocoelho commented May 21, 2015

Thanks @dwlfrth, that works now.
I did the following steps:

  1. Added paginate_path: "blog/page:num" to _config.yml
  2. Replaced occurrences of {{ site.baseurl }}/ by {{ site.baseurl }}/blog/ in _includes/pagination.html
  3. Created a folder /blog/ in the site root and moved the sample index.html onto blog/index.html.
@dwlfrth

This comment has been minimized.

dwlfrth commented May 21, 2015

@eduardocoelho
Faced the exact same "issue" a month ago while migrating my stuff to Pixyll ;)
Pleasure!

@johno

This comment has been minimized.

Owner

johno commented May 22, 2015

Thanks @eduardocoelho and @dwlfrth for getting to the bottom of this and documenting your approach to implementing this. I'm sure it will be very useful for others in the future. Thanks! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment