Collections list


#1

I’m not a programmer… or really a developer. I guess I’m a part time hacker. I have managed to work through the documents and managed to display my collections folder on a page, and have links working. However the order of the links is not working quite how I would like. The rendered page looks like this:

Genesis
01 10 11 12 13 14 15 16 17 18 19 02 20 03 04 05 06 07 08 09

I would like it to look like this:

Genesis
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20

I’m sure it is something simple… but I can’t seem to figure it out. Any help would greatly be appreciated. I’m completely new to Jekyll.

My page calling it looks like this:

	{% for book in site.genesis %}
		<a href="{{ book.url }}">{{ book.chapter }}</a>
	{% endfor %}

Shane


#2

is there a repo to look at?

I have not seen that type of sorting when you have leading zeroes- you’re sure they aren’t 1,2,3…? when strings are compared they will sort as 1,10,11,12.

But adding the zeroes is what always fixes it for me.


#3

Oh, as it turned out, it is file name. So I changed the file names to 01.md 02.md etc. and that fixed it. I was editing the md file trying to fix it, and it was just the file name. So I got it fixed. Thanks though!

And, no, no repo. I’m building it locally, and plan on hosting it to my server.