mirror of
https://github.com/clockworkpi/wiki.clockworkpi.com.git
synced 2026-03-19 10:22:45 +01:00
Issue #3 List of pages (long and short)
This commit is contained in:
13
_plugins/hook-wiki-page-enhancer.rb
Normal file
13
_plugins/hook-wiki-page-enhancer.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
Jekyll::Hooks.register :documents, :pre_render do |post|
|
||||
end
|
||||
|
||||
Jekyll::Hooks.register :documents, :post_render do |doc|
|
||||
# Jekyll.logger.info "Generating:", "Firing :pages, :post_render for : #{post.content}"
|
||||
if doc.content then
|
||||
doc.data['size']=doc.content.size
|
||||
doc.data['bytes']=doc.content.bytesize
|
||||
else
|
||||
doc.data['size']=0
|
||||
doc.data['bytes']=0
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user