openpreserve / jpylyzer

JP2 (JPEG 2000 Part 1) validator and properties extractor. Jpylyzer was specifically created to check that a JP2 file really conforms to the format's specifications. Additionally jpylyzer is able to extract technical characteristics.
http://jpylyzer.openpreservation.org/
Other
69 stars 28 forks source link

Website broken after Github upgraded to Jekyll 3 #89

Closed bitsgalore closed 8 years ago

bitsgalore commented 8 years ago

After upgrade links to blog posts didn't work. Other users are reporting similar issues, e.g.:

https://twitter.com/nikosbaxevanis/status/694624909478203392

This led me to:

https://github.com/jekyll/jekyll/issues/4440

Based on this is added a trailing slash to permalink in the config yml, but this led to other problems (manual pages not working, messed up stylesheet refs in blog posts). Also I ran into several problems trying to upgrade my local machine to Jekyll 3 and its dependencies, so it may take a while to sort this out ...

Actually the pages are accessible but links to stylesheets now go wrong (undid earlier change).

Also some Markdown now isn't rendered correctly (fix: insert space?)

bitsgalore commented 8 years ago

Applied following fixes:

  1. Explicitly set ASSET_PATH in _config.yml as a workaround around this bug in Jekyll. This fixes the faulty stylesheet references in the blog posts.
  2. Fixed some Markdown that didn't render correctly in Jekyll 3.

The remaining problem is that all previous links to blog posts now don't work anymore, because Jekyll 3 handles permalinks differently (trailing slashes removed in Jekyll 3). Example:

http://jpylyzer.openpreservation.org//2015/12/07/Release-of-jpylyzer-1-16-0/ (Old link, now broken) http://jpylyzer.openpreservation.org//2015/12/07/Release-of-jpylyzer-1-16-0 (New link)

In the thread here several people have suggested to add a trailing slash to the permalink variable. I tried this:

permalink: /:categories/:year/:month/:day/:title/

After this change the old links worked again, but it breaks the links to all pages that are not a blog post! Instead, as a workaround I added some Javascript to the 404 page that redirects old "old" URLs to the new location. Workaround taken from Dean Attali:

https://github.com/daattali/daattali.github.io/blob/master/404.html#L14-L21