Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

Enable using other Utils.slugify mode than the "default" + use predefined slug #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jussikinnula
Copy link

We had a problem on combining Jekyll + Jekyll Contentful + JavaScript app with the default URL slugification mechanism. We are using "ascii" mode with Utils.slugify, so it makes sense to make Jekyll Contentful configurable so that the slugification mode can be set dynamically.

Besides the making Utils.slugify mode configurable, it's good practise to allow the user inputting content to be able to specify exact slug name for the URL (if content has "slug" property, it will be used without any slugification as a slug).

Note! This pull request doesn't change the default functionality, so it'll work with older projects as is without any configuration or content changes. The "ascii" mode will be shipped along on Jekyll 3.3.0 release (there's already RC1 available). If the current stable Jekyll version would be used with Jekyll Contentful setting the Utils.slugify mode to "asciI", it will just use the "default" mode instead.

@dommmel
Copy link
Owner

dommmel commented Oct 18, 2016

Thanks for the PR. Could you add something in the README about the fact that data["slug"] is used when present as page_title_slug?

@jussikinnula
Copy link
Author

I updated the slugify part in the README for all the possible options, as well as the data["slug"] part.

@jussikinnula
Copy link
Author

Ping @dommmel, there shouldn't be any issues with the changes with Jekyll v3.4.0 (latest official release was done in January).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants