From 462ae5a2a7519d8ffb5f2f9fa6d84471ca83a29b Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 22 Aug 2017 12:05:59 +0300 Subject: Render different layouts This adds the possibility to have multiple layouts when rendering HTML How to: 1. Add a layout in layouts/ 1. In the markdown's yaml file refer to it: layout: article --- Rules | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Rules') diff --git a/Rules b/Rules index 989e14c42..cb0fd3b26 100644 --- a/Rules +++ b/Rules @@ -50,7 +50,11 @@ compile '/**/*.md' do }, with_toc: include_toc - layout '/default.*' + if item[:layout].nil? + layout '/default.*' + else + layout "/#{item[:layout]}.*" + end filter :md_to_html_ext else -- cgit v1.2.3