0

I'm a happy Jekyllbootstrap user, however the index.md template is compiled to index.html. This is expected, but for me undesired behaviour.

When the navigation links to the homepage it uses index.html on the anchor. I can get around this using an nginx redirect, but I don't want to have any links on my site that I'm "fixing" using 301 redirects. I'd like it to generate the correct link in the first place.

So to be clear. I don't want jekyll to ever link to index.html but instead link to /.

Dean
  • 5,884
  • 2
  • 18
  • 24
  • Can you explain a little. Why do you need to make a redirect to index.html ? – David Jacquel Oct 17 '14 at 20:34
  • I want the opposite. I want Jekyll to always link to my homepage (it's only linked in the nav as far as I can see) using the URL `/` and not `index.html`. – Dean Oct 17 '14 at 21:13

2 Answers2

0

You can modify the variable HOME_PATH in _includes/JB/setup. By default it is {% assign HOME_PATH = "/" %}.

David Jacquel
  • 51,670
  • 6
  • 121
  • 147
  • It is already set to "/", but the navigation is still output as "index.html" for "Home". I worked around this by setting the `permalink` configuration property to `/` in the index.md file. – Dean Oct 18 '14 at 11:28
0

I found the answer to this. I had to set the following at the top of my index.md file:

---
layout: page
title: Home
group: navigation
permalink: /
---

The key part here being permalink: /

Dean
  • 5,884
  • 2
  • 18
  • 24