Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Rules
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axilleas@axilleas.me>2017-08-22 12:05:59 +0300
committerAchilleas Pipinellis <axilleas@axilleas.me>2017-08-22 12:05:59 +0300
commit462ae5a2a7519d8ffb5f2f9fa6d84471ca83a29b (patch)
tree5872622456525e2b0379a4b47ad34c55d6a960f0 /Rules
parent64fdf310c912bbb66aa8cb1b44a2d36ed8cecf75 (diff)
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
Diffstat (limited to 'Rules')
-rw-r--r--Rules6
1 files changed, 5 insertions, 1 deletions
diff --git a/Rules b/Rules
index 989e14c4..cb0fd3b2 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