jekyll-planningwikiplugins 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jekyll-planningwikiplugins.rb +17 -0
- data/lib/jekyll/planningwikiplugins/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfe9d07c1d6148a6fe4165db41c1b719e66f139309a144e1c1c8640330fc29c8
|
4
|
+
data.tar.gz: 2adc4d70a828dae068c907a7a2935b546a3d87442d3a4af3ce7d3ec83381aa9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9ca772646c764c6ae01986e988735aa82cb69cf07901a4a26ea764e144f2974694e8f9f3d7aa9d2093c60184707b9ef448295c76808b05e763d7e136b051cce
|
7
|
+
data.tar.gz: 80280fd717803d5b2b180ca65a681a5308fec4b8bb2d680b51a7af39518aa0c5874e7f3b154750ec317796a8b90026b038d7054ea6d7c8c0ce3979f96e28d809
|
@@ -49,6 +49,22 @@ module Jekyll
|
|
49
49
|
result
|
50
50
|
end
|
51
51
|
end
|
52
|
+
class PlannerLinkTag < Liquid::Tag
|
53
|
+
def initialize(tag_name, text, tokens)
|
54
|
+
super
|
55
|
+
@text = text
|
56
|
+
end
|
57
|
+
|
58
|
+
def render(context)
|
59
|
+
#Split by space
|
60
|
+
tags = @text.split(' ')
|
61
|
+
result = "tags: "
|
62
|
+
tags.each do |tag|
|
63
|
+
result = "#{result} <a href=\"/ref/planners/#{tag.downcase}\">#{tag}</a>"
|
64
|
+
end
|
65
|
+
result
|
66
|
+
end
|
67
|
+
end
|
52
68
|
class CitePaperTag < Liquid::Tag
|
53
69
|
def initialize(tag_name, text, tokens)
|
54
70
|
super
|
@@ -70,6 +86,7 @@ module Jekyll
|
|
70
86
|
end
|
71
87
|
end
|
72
88
|
|
89
|
+
Liquid::Template.register_tag('planner', Jekyll::PlannerLinkTag)
|
73
90
|
Liquid::Template.register_tag('planner_tag', Jekyll::PlannerTag)
|
74
91
|
Liquid::Template.register_tag('git_author', Jekyll::GitAuthorTag)
|
75
92
|
Liquid::Template.register_tag('git_author_all', Jekyll::GitAuthorAllTag)
|