Forum

Jekyll permalinks

Alex
16 September 2015, 04:18
Hello,

I ask please to help out a newbie to configure this wonderful web server for Jekyll.

In Jekyll documentation it is said that: "Jekyll supports permalinks that contain neither a trailing slash nor a file extension, but this requires additional support from the web server to properly serve."

http://jekyllrb.com/docs/permalinks/

And there are settings for Apache and nginx:

Options +MultiViews

try_files $uri $uri.html $uri/ =404;

Would you please advise how to achieve the same on Hiawatha.

Thank you!

Regards,
Alex
Hugo Leisink
16 September 2015, 10:25
I don't know Jekyll, so I took a quick look at it. But even after that I still have no idea how it is supposed to work. Probably mainly because I don't know much about Ruby. So, I'm afraid I can't help you with this.
Alex
16 September 2015, 11:30
Dear Hugo,

Jekyll is kind of preprocessor that is written in Ruby and is based on templates.
Jekyll generates plain static HTML files.

I've been reading information on URL toolkit, but this would take time for a newbie like me process it.

Is there an equivalent in Hiawatha for the Apache's .htaccess:

Options +MultiViews

or nginx's:

try_files $uri $uri.html $uri/ =404;

So that a plain index.html located at the bottom of the directory structure:

2015
|-->
09
|-->
16
|-->
whats-jekyll
|-->
index.html

2015 / 09 / 16 / whats-jekyll / index.html

would be served by the server when navigating to my.com/2015/09/16/whats-jekyll/


Thank you.

Regards,
Alex
Hugo Leisink
16 September 2015, 11:36
When a directory is requested, Hiawatha will look for the file specified via StartFile (default = index.html). So, if that is what you want, then you don't have to do a thing. I will already work.
Alex
16 September 2015, 11:39
Oh that is wonderful.
Thank you!

Regards,
Alex
This topic has been closed.