move hook event
This commit is contained in:
parent
c8c7cbbd18
commit
9727a1a4d1
@ -5,12 +5,12 @@ front_matter_date = DateTime.now.strftime('%Y-%m-%d')
|
|||||||
EMPTY_FRONT_MATTER = <<~JEKYLL
|
EMPTY_FRONT_MATTER = <<~JEKYLL
|
||||||
---
|
---
|
||||||
date: #{front_matter_date}
|
date: #{front_matter_date}
|
||||||
|
status: 🌱
|
||||||
---
|
---
|
||||||
|
|
||||||
JEKYLL
|
JEKYLL
|
||||||
|
|
||||||
# Inject empty front matter in notes that don't have any
|
# Inject empty front matter in notes that don't have any
|
||||||
Jekyll::Hooks.register :site, :after_init do |site|
|
Jekyll::Hooks.register :site, :post_read do |site|
|
||||||
Dir.glob("#{site.collections['notes'].relative_directory}/**/*.md").each do |filename|
|
Dir.glob("#{site.collections['notes'].relative_directory}/**/*.md").each do |filename|
|
||||||
raw_note_content = File.read(filename)
|
raw_note_content = File.read(filename)
|
||||||
unless raw_note_content.start_with?('---')
|
unless raw_note_content.start_with?('---')
|
||||||
|
Loading…
Reference in New Issue
Block a user