Discussion:
[hakyll] Pagination
a***@aas.sh
2018-05-31 12:16:14 UTC
Permalink
Hey everyone, beginner here, I'm trying to set up pagination on my blog,
but I can't figure out how its done.

I was following this guide:
https://dannysu.com/2015/10/29/hakyll-pagination/ and I got all the way to
the bottom, but I'm afraid I'm not sure how its used. The lines created
make 'rules', but applying those rules doesn't seem to do anything. If I
use create["index.html"] without referring to pagination, everything works,
however as soon as I use rules involving pagination index.html no longer
gets created and the root of my site with a file browser is shown.

Does anyone know how I could alter my code to make this work? Thank you in
advance!

https://pastebin.com/65jMY8Un
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ian Ross
2018-05-31 13:17:33 UTC
Permalink
Hi Ashley,

Funny, I had to do this just the other day... Looking at your code, I
think you just need to remove the 'create ["index.html"] $ ' before
you call paginateRules. The paginateRules function creates the index
page identifiers itself.

Cheers,

Ian.
Hey everyone, beginner here, I'm trying to set up pagination on my blog, but
I can't figure out how its done.
https://dannysu.com/2015/10/29/hakyll-pagination/ and I got all the way to
the bottom, but I'm afraid I'm not sure how its used. The lines created make
'rules', but applying those rules doesn't seem to do anything. If I use
create["index.html"] without referring to pagination, everything works,
however as soon as I use rules involving pagination index.html no longer
gets created and the root of my site with a file browser is shown.
Does anyone know how I could alter my code to make this work? Thank you in
advance!
https://pastebin.com/65jMY8Un
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Ian Ross Tel: +43(0)6804451378 ***@skybluetrades.net www.skybluetrades.net
PGP Key: 0x04490CC0/F4D6 027F 2661 745C 83A5 297D FCCC 0AE6 0449 0CC0
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
a***@aas.sh
2018-05-31 13:36:59 UTC
Permalink
Hey there, so simply removing 'create ["index.html"]' appears to do
nothing, and I still have no index.html page and it's still displaying the
file browser.

Here's what the code looks like now:
https://pastebin.com/Pq74MPJr

I bet it's some small error, either that, or I completely have no idea what
I'm doing. From what I understand, 'match' and 'create' are functions which
take an identifier ("index.html") and then some rules as to what to do with
it. So without specifying index.html anywhere, I'm not sure how I'm going
to create it.

Index html is simply going to use a template and pull in posts to display
with it. In my mind it doesn't make sense to use match and have a file
index.html in my directory, as I don't have a homepage and it's going to
paginate anyway, so this acts more like the 'archive' page in the example
site.

Thanks for your reply. Just letting you know what I'm heading out for a few
hours in a moment, so when I get back I'll implement what you suggest and
get back to you how I get on!

Thanks!
Post by Ian Ross
Hi Ashley,
Funny, I had to do this just the other day... Looking at your code, I
think you just need to remove the 'create ["index.html"] $ ' before
you call paginateRules. The paginateRules function creates the index
page identifiers itself.
Cheers,
Ian.
Post by a***@aas.sh
Hey everyone, beginner here, I'm trying to set up pagination on my blog,
but
Post by a***@aas.sh
I can't figure out how its done.
https://dannysu.com/2015/10/29/hakyll-pagination/ and I got all the way
to
Post by a***@aas.sh
the bottom, but I'm afraid I'm not sure how its used. The lines created
make
Post by a***@aas.sh
'rules', but applying those rules doesn't seem to do anything. If I use
create["index.html"] without referring to pagination, everything works,
however as soon as I use rules involving pagination index.html no longer
gets created and the root of my site with a file browser is shown.
Does anyone know how I could alter my code to make this work? Thank you
in
Post by a***@aas.sh
advance!
https://pastebin.com/65jMY8Un
--
You received this message because you are subscribed to the Google
Groups
Post by a***@aas.sh
"hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by a***@aas.sh
For more options, visit https://groups.google.com/d/optout.
--
www.skybluetrades.net
PGP Key: 0x04490CC0/F4D6 027F 2661 745C 83A5 297D FCCC 0AE6 0449 0CC0
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...