From 7ac4f5c3e205dbfa9c48ab1996d17fa2a69bf1c5 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 15 Aug 2020 16:14:43 -0300 Subject: Run Jekyll hooks on :pages too --- _plugins/add-anchor-to-code-block-line-numbers.rb | 2 +- _plugins/add-anchor-to-header-from-header-id.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_plugins/add-anchor-to-code-block-line-numbers.rb b/_plugins/add-anchor-to-code-block-line-numbers.rb index d4cf763..ef9f579 100644 --- a/_plugins/add-anchor-to-code-block-line-numbers.rb +++ b/_plugins/add-anchor-to-code-block-line-numbers.rb @@ -1,6 +1,6 @@ PREFIX = '
'
 POSTFIX = '
' -Jekyll::Hooks.register :documents, :post_render do |doc| +Jekyll::Hooks.register [:documents, :pages], :post_render do |doc| if doc.output_ext == ".html" code_block_counter = 1 doc.output = doc.output.gsub(/
[\n0-9]+<\/pre>/) do |match|
diff --git a/_plugins/add-anchor-to-header-from-header-id.rb b/_plugins/add-anchor-to-header-from-header-id.rb
index 8c100b0..25829a2 100644
--- a/_plugins/add-anchor-to-header-from-header-id.rb
+++ b/_plugins/add-anchor-to-header-from-header-id.rb
@@ -1,4 +1,4 @@
-Jekyll::Hooks.register :documents, :post_render do |doc|
+Jekyll::Hooks.register [:documents, :pages], :post_render do |doc|
   if doc.output_ext == ".html"
     doc.output =
       doc.output.gsub(
-- 
cgit v1.2.3