From 58fac8db25103c7943325fb75bab73b68aaa7fb9 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Fri, 16 Mar 2018 13:13:20 +0200 Subject: [PATCH 1/2] Only inject docsearch JavaScript when docsearch is enabled. While this won't be necessary for much longer since we'll enable it everywhere (hopefully), there's no sense in loading extra unused JavaScript on repositories that may choose to not have search, or just don't have it configured yet. --- _config.yaml => _config.yml | 0 layout/layout.ejs | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename _config.yaml => _config.yml (100%) diff --git a/_config.yaml b/_config.yml similarity index 100% rename from _config.yaml rename to _config.yml diff --git a/layout/layout.ejs b/layout/layout.ejs index 8875e25..fd86899 100644 --- a/layout/layout.ejs +++ b/layout/layout.ejs @@ -47,7 +47,9 @@ <%- body %> - + <% if (config.apis && config.apis.docsearch) { %> + + <% } %>