diff --git a/layout/_pre.ejs b/layout/_pre.ejs new file mode 100755 index 0000000..907e56f --- /dev/null +++ b/layout/_pre.ejs @@ -0,0 +1,11 @@ +<% +if (is_home() || is_category() || is_archive() || is_tag() || page.layout == 'list') { + if (theme.layout.on_list.sidebar.length == 0) { + page.sidebar = false; + } +} else { + if (theme.layout.on_page.sidebar.length == 0) { + page.sidebar = false; + } +} +%> diff --git a/layout/archive.ejs b/layout/archive.ejs index df2b50d..c0a888b 100755 --- a/layout/archive.ejs +++ b/layout/archive.ejs @@ -1,3 +1,4 @@ +<%- partial('_pre') %>