Add two-digit years to permalinks #2301
Merged
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.
This adds a :short_year url place holder that allows two-digit years, i.e. years without the century, to be used in urls. It also adds a corresponding entry in site/docs/permalinks.md.
For example:
the permalink: /:year/:month/:day/:title/ -> /2009/04/29/slap-chop/
could become /:short_year/:month/:day/:title/ -> /09/04/29/slap-chop/
the permalink: /:month-:day-:year/:title.html -> /04-29-2009/slap-chop.html
could become /:month-:day-:short_year/:title.html -> /04-29-09/slap-chop.html