1
我試圖創建一個簡單的哲基爾轉換器插件,它是Converter Plugin in the Jekyll Documentation幾乎完全克隆,但它似乎不工作:簡單傑基爾轉換器插件不工作
module Jekyll
class MyConverter < Converter
safe false
priority :high
def matches(ext)
ext =~ /^\.(md|markdown)$/i
end
def output_ext(ext)
".html"
end
def convert(content)
content.upcase
end
end
end
我已經放在這個文件my_converter.rb
進入我的_plugins
目錄。
現在,當我做bundle exec jekyll serve
時,我希望看到呈現爲HTML的每個降價頁面的內容都將轉換爲大寫。但是,似乎沒有發生。
我錯過了什麼? (我是Ruby新手,順便說一句)
PS,我已經嘗試了這個SO回答中的建議(將我預處理過的'content'字符串提供給默認的Markdown轉換器),無濟於事。 https://stackoverflow.com/questions/22761691/how-to-pass-content-to-jekyll-default-converter-after-custom-conversion –