Make sure that the default theme is the first one listed in themes.yml (#229)

We want the default theme to be Aubergine since that is the default that comes
with Slack. However, we were actually relying on the first theme in alphabetical
sorted order as the default theme, which ended up changing the default as themes
got added.

This patch always makes it the first entry in the themes.yml file
This commit is contained in:
Ufuk Kayserilioglu
2018-12-13 12:13:04 -05:00
committed by GitHub
parent 65c2d2b2f6
commit aea00e4941
2 changed files with 10 additions and 2 deletions
+8
View File
@@ -105,4 +105,12 @@ helpers do
))
end
end
def default_theme
theme = data.themes.first
OpenStruct.new(theme.merge(
slug: theme['name'].parameterize.underscore,
digest: Digest::MD5.new.hexdigest(theme['colors'])
))
end
end