imathis / octopress

Octopress is an obsessively designed framework for Jekyll blogging. It’s easy to configure and easy to deploy. Sweet huh?
http://github.com/imathis/octopress
9.32k stars 2.63k forks source link

Adding categories with spaces in them #1717

Open FrankPortman opened 9 years ago

FrankPortman commented 9 years ago

I have categories with spaces in them. I add them in a post as follows:

layout: post
title: "Visualizing the Magnitude of Earthquakes in New Zealand"
date: 2012-11-06 19:19:41 -0800
categories: [Data Visualization with R]
comments: true

Octopress correctly generates the path data-visualization-with-r and when I go to mysite.com/categories/data-visualization-with-r all is well.

However, on the default categories page, mysite.com/categories, the link to this category is:

mysite.com/categories/data%20visualization%20with%20r/

which is empty.

Is there a way to have the actual category name have spaces in it, but correctly link to either the hyphenated version or the 'spaced' version on the categories page?

Thanks.

FrankPortman commented 9 years ago

Update: I should add that the link from the main blog page is also correct (goes to url with hypens). The only place where it is wrong/different is on the /categories page.

tangledhelix commented 9 years ago

I just attempted to replicate this so I could try to contribute a fix. After updating octopress to HEAD and doing update tasks, then rake generate, I find that while I have categories/{category}/index.html files, categories/ itself contains no files, including index.html. @FrankPortman seems to have a categories/index.html file... anyone know why I wouldn't be generating that file?

I'm sort of stuck, since that's the only place that he saw this issue...

emad-elsaid commented 9 years ago

@tangledhelix i also tried to generate a post with the same as @FrankPortman and i didn't get a /categories page. @FrankPortman are you using any theme or is there any other setup we should be aware of while debugging this?