Skip to content

Commit 33fb635

Browse files
committed
Minify search-index.json on production builds
1 parent 87ae510 commit 33fb635

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

content/search/search-index.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
%>
1919
<%=
2020
#output the generated tree
21-
# TODO JSON.generate() always/on production builds?
22-
JSON.pretty_generate(@output.sort{|a, b| a[:title] <=> b[:title]})
21+
if ENV['RACK_ENV'] == "production"
22+
JSON.generate(@output.sort{|a, b| a[:title] <=> b[:title]})
23+
else
24+
JSON.pretty_generate(@output.sort{|a, b| a[:title] <=> b[:title]})
25+
end
2326
%>

0 commit comments

Comments
 (0)