adaoraul / rack-jekyll

Transform your Jekyll app into Rack application!
http://adaoraul.github.io/rack-jekyll
MIT License
182 stars 43 forks source link

dealing with .html extensions #47

Open jeffreycwitt opened 8 years ago

jeffreycwitt commented 8 years ago

I create a jekyll post with the following header with a permalink that is not followed by .html


---
layout: post
title:  Creating IIIF Manifests
date:   2015-06-01
permalink: /creating-iiif-manifests

---

the result of this is a file in the directory _site called:

file: creating-iiif-manifests.html

On my local machine, when running bundle exec jekyll build

the permalink resolves as follows:

url: localhost/creating-iiif-manifests (without the .html extension)

However when I try to run this on heroku using the rack-jekyll gem,

the permalink

myapp.herokuapp.com/localhost/creating-iiif-manifests does not resolve.

the .html must be added

I'm wondering if there is a setting in the rack-jekyll gem that can be changed so that the link /creating-iiif-manifests will still resolve without the the .html extension.

rpechayr commented 8 years ago

I am having a similar issue here.

In my page YFM:

permalink: somepage.html

When running the site locally with jekyll serve I can access /somepage as well as /somepage.html, but when running my site on heroku (which is equivalent to running rackup locally), the pretty version of the permalink does not work.

Here is my config.ru file :

#config.ru

# This file is auto-generated by Jekyll Auth
# It tells Heroku how to launch our site

require 'rack/jekyll'
run Rack::Jekyll.new
stomar commented 8 years ago

You might try the lanyon gem (https://github.com/stomar/lanyon), which is an (almost) drop-in replacement for rack-jekyll (it does not provide auto-regeneration, though).

config.ru:

require "lanyon"
run Lanyon.application
lucasm-iRonin commented 4 years ago

Thanks @stomar . I also had the same issue and switching to lanyon fixed it for me.