diff --git a/plugins/details.rb b/plugins/details.rb index 5e081d1de98..d1d5daa96bc 100644 --- a/plugins/details.rb +++ b/plugins/details.rb @@ -4,6 +4,7 @@ module Jekyll def initialize(tag_name, title, tokens) super @title = title + @details_idx = 1 end def render(context) @@ -15,25 +16,35 @@ module Jekyll end title = title.to_s.delete("\"") + idx = context["details_idx"] + if idx.nil? then + idx = 0 + end + context["details_idx"] = idx + 1 + <<~MARKUP