Ability to create navigation based on file structure #893

Closed
uliska opened this Issue Mar 28, 2013 · 5 comments

Projects

None yet

3 participants

@uliska
uliska commented Mar 28, 2013

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
    https://gist.github.com/JanDupal/3765912 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/1.introduction.md) that information is used for sorting
    but stripped off from the permalink.

Unfortunately I have no clue on the implementation

@parkr
Member
parkr commented Mar 28, 2013

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.

@uliska
uliska commented Mar 28, 2013

Am 28.03.2013 13:15, schrieb Parker Moore:

Our central focus is blogs.

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.

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.

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'.

What, exactly, are you asking for? A |sorted_for| tag that sorts the
input? I could see that being quite useful.

I would like to determine the sort order in a for loop traversing e.g.
site.pages. 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).
So, yes, I think your assumption is correct.
As I don't know Ruby and the Jekyll architecture I'm not sure if that
would basically mean to drop the example I linked to in my original post
into /lib/jekyll/tags or to include the code in some other file.

I don't think |2| in your list above is a viable option for this project.

Too bad, but I can somewhat see why (although I'd repeat my first remark
in this comment ...)


Reply to this email directly or view it on GitHub
#893 (comment).

@parkr
Member
parkr commented Mar 28, 2013

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.
site.pages.

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.

@uliska
uliska commented Mar 28, 2013

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.
OK, I'll give it a try.

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

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

OK, I'll also give it a try (this seems like a manageable challenge to
try out). If it works I'll open a pull request.

@penibelst
Member

@jekyll/owners: can be closed.

@parkr parkr closed this May 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment