Skip to content

Commit

Permalink
fix: allow arbitrary paths in any permalink (SchemaStore#3483)
Browse files Browse the repository at this point in the history
Allow "global" permalinks to contain arbitrary prefixes, such that
/posts/:year/:month/:day/:title/ is considered valid.
  • Loading branch information
kohlschuetter committed Dec 27, 2023
1 parent 207eae6 commit 0aa2265
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/schemas/json/jekyll.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"/:categories/:year/:week/:short_day/:title:output_ext",
"/:categories/:title:output_ext"
],
"pattern": "^((/(:(year|short_year|month|i_month|short_month|long_month|day|i_day|y_day|w_year|week|w_day|short_day|long_day|hour|minute|second|title|slug|categories|slugified_categories|output_ext))+)+|date|pretty|ordinal|weekdate|none)(/?)$"
"pattern": "^((.*(:(year|short_year|month|i_month|short_month|long_month|day|i_day|y_day|w_year|week|w_day|short_day|long_day|hour|minute|second|title|slug|categories|slugified_categories|output_ext))+)+|date|pretty|ordinal|weekdate|none)(/?)$"
},
"collection-permalink": {
"description": "The collection permalink format\nhttps://jekyllrb.com/docs/permalinks/#collections",
Expand Down
13 changes: 12 additions & 1 deletion src/test/jekyll/_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,18 @@ timezone: null

quiet: false
verbose: false
defaults: []
defaults:
- scope:
path: '' # An empty string here means all files in the project
type: posts
values:
layout: post
comments: true # Enable comments in posts.
toc: true # Display TOC column in posts.
# DO NOT modify the following parameter unless you are confident enough
# to update the code of all other post links in this project.
#permalink: /posts/:title/
permalink: /posts/:year/:month/:day/:title/

liquid:
error_mode: warn
Expand Down

0 comments on commit 0aa2265

Please sign in to comment.