{{ $stylesheets := slice (resources.Get "styles/railroad.css")
                         (resources.Get "styles/monokai.css")
                 | append (resources.Match "styles/root/*.css" | sort) }}
{{ if not hugo.IsProduction }}
  {{ $stylesheets = $stylesheets | append (resources.Get "styles/development.css") }}
{{ end }}

{{ $rootStylesheets := slice }}
{{ range $stylesheets }}
  {{ $rootStylesheets = $rootStylesheets | append (. | resources.ExecuteAsTemplate .Name .) }}
{{ end }}

{{ if hugo.IsProduction }}
  {{ $rootStylesheets = slice ($rootStylesheets
      | resources.Concat "styles/root.css"
      | fingerprint "md5") }}
{{ end }}

{{ return $rootStylesheets }}
