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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.