We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7649d62 commit e617335Copy full SHA for e617335
_plugins/sip_number_permalink.rb
@@ -0,0 +1,12 @@
1
+# frozen_string_literal: true
2
+
3
+# This plugin allows using front matter variables in permalinks.
4
+# For example: permalink: /sips/:number will use the 'number' front matter field.
5
6
+Jekyll::Hooks.register :site, :after_init do
7
+ Jekyll::Drops::UrlDrop.class_eval do
8
+ def number
9
+ @obj.data["number"].to_s if @obj.data["number"]
10
+ end
11
12
+end
0 commit comments