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 /content | |
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 'content')
-rw-r--r-- | content/index.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/index.erb b/content/index.erb index b63b494c..6305ab51 100644 --- a/content/index.erb +++ b/content/index.erb @@ -4,7 +4,7 @@ title: GitLab Documentation <ul class="topics" itemscope itemtype="http://www.schema.org/SiteNavigationElement"> <% @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="topic-<%= product[:slug] %>"> <a href="<%= @items["/#{product[:slug]}/#{product[:index_file]}"].path %>" itemprop="url"> <div class="wrapper"> |