I'm currently using some .md pages to write up pure documentation pages (not associated with any category, just straight up docs). In both Hologram and Cortana theme the title of the page is set via the doc block. But for markdown files it appears that an empty doc block is passed in during rendering.
def process_files(files, directory, doc_block_collection)
files.each do |input_file|
if input_file.end_with?('md')
@pages[File.basename(input_file, '.md') + '.html'] = {:md => File.read("#{directory}/#{input_file}"), :blocks => []}
elsif input_file.end_with?('erb')
@pages[File.basename(input_file, '.erb')] = {:erb => File.read("#{directory}/#{input_file}")}
else
process_file("#{directory}/#{input_file}", doc_block_collection)
end
end
end
Is there any other way to set the title for these pages? I'd hate to have to create conditions in my header.html for every single page I create.
<% if file_name.include?('my-file.html') %>`<h1>My File</h1>
<% elsif file_name.include?('my-other-file.html') %>`<h1>My Other File</h1>
<% end %>
I'm currently using some .md pages to write up pure documentation pages (not associated with any category, just straight up docs). In both Hologram and Cortana theme the title of the page is set via the doc block. But for markdown files it appears that an empty doc block is passed in during rendering.
Is there any other way to set the title for these pages? I'd hate to have to create conditions in my header.html for every single page I create.