Skip to content


Ability to create navigation based on file structure #893

uliska opened this Issue · 5 comments

3 participants


If I'm not completely mistaken by the docs and Google results it is actually a pain to create a standard hierarchical navigation - due to the fact that Jekyll is quite blog-centric. Obviously that can't be achieved without additional plugins.

It would be very useful to be easily able to create a non-blog traditionally navigated web site with Jekyll. If it wasn't for GitHub pages, this would definitely be a show-stopper for me, and I'd look for another way to create my pages.

I'm not able to open a pull request because I just can't learn another new language after all the others I have scratched upon. So I make a few suggestions:

  1. One option would be to include something like in the default installation.
  2. I would find it interesting if while traversing the directories Jekyll would generate a hierarchical list of folders and pages.
    I suggest one change in the parsing process:
    If a folder of file name is prepended by a number and a dot (e.g. /1.project1/ that information is used for sorting but stripped off from the permalink.

Unfortunately I have no clue on the implementation

Jekyll member

Our central focus is blogs. If you use an external plugin but still want to use GitHub Pages, you have the option of pushing the generated static site up to your desired destination.

What, exactly, are you asking for? A sorted_for tag that sorts the input? I could see that being quite useful. I don't think 2 in your list above is a viable option for this project.

Jekyll member

I see that, but I find it somewhat deficient for GitHub's main web
serving option.
I think a blog is one of several natural choices on how to present a
GitHub project.
Unfortunately only @mojombo can make the call as to what is sufficient and insufficient for GitHub Pages in terms of what to include in this project and what not to. One can surely use Jekyll for many different kinds of sites, but this static site generator is undeniably blog-centric.

I know that this would be a workaround, but of course this would
considerably affect our collaborative workflow, because either every
member would have to locally install Jekyll or publishing of new web
material would have to be relayed to a dedicated 'webmaster'.

It would be very simple for you to coordinate this with a build server if you thought installing a gem locally was too much work for your and your teammates.

I would like to determine the sort order in a for loop traversing e.g.

Seems reasonable. We'd write a Liquid tag for this and put it in lib/jekyll/tags as you mentioned.

As far as I found on the net Jekyll locally sorts by file
name, but on GitHub pages it sorts by the timestamp the files get during
the push (resulting in a random ordering).

Not technically random, per se, but certainly not readily decipherable by a human.

Pages should be sorted by name, and posts should be sorted by timestamp.

Jekyll member

@jekyll/owners: can be closed.

@parkr parkr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.