parse.html 664 B

12345678910111213141516171819202122
  1. {{ $return := "" }}
  2. {{ with site.Data.wowchemy_cms_tpl }}
  3. {{ $return = . }}
  4. {{ end }}
  5. {{ $backend_opts := dict "branch" (site.Params.extensions.cms.branch | default "main") }}
  6. {{ with site.Params.extensions.cms.publish_mode }}
  7. {{ $publish_mode := dict "publish_mode" . }}
  8. {{ $return = merge $return $publish_mode }}
  9. {{ end }}
  10. {{ $local_backend := false }}
  11. {{ if site.Params.extensions.cms.local_backend | or (not hugo.IsProduction) }}
  12. {{ $local_backend = true }}
  13. {{ end }}
  14. {{ $return = merge $return (dict "local_backend" $local_backend) }}
  15. {{ $backend := dict "backend" $backend_opts }}
  16. {{ $return := merge $return $backend }}
  17. {{- return $return -}}