diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2018-01-29 14:44:22 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-02-07 17:19:44 +0300 |
commit | 03c9a426e5931ff240be0506539b0b2ca3e6fafe (patch) | |
tree | c985fa8713d4615e2f44577dcada529ff9359724 /layouts | |
parent | 6d0ebac5fcf8680a72dbf15aba8a1255cf0033f6 (diff) |
Check if the content dirs exist when building
This makes it easier to get the site up and running without
crashing if a content dir is missing.
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/header.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/header.html b/layouts/header.html index a69af72e..5999c420 100644 --- a/layouts/header.html +++ b/layouts/header.html @@ -8,7 +8,7 @@ <ul class="nav"> <li class="search"><input type="text" class="docsearch" placeholder="Search"></li> <% @config[:products].each do |name, product| %> - <% if product[:expose] == true && @items["/#{product[:slug]}/#{product[:index_file]}"] %> + <% if product[:expose] == true && Dir.exist?("#{@config[:content_dir]}/#{product[:slug]}")%> <li class="nav-item"> <a href="<%= @items["/#{product[:slug]}/#{product[:index_file]}"].path %>"> <%= product[:short_name] %> |