Skip to content

Commit

Permalink
feat: allow adding custom preview styles (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Nov 26, 2023
1 parent 8f0bd99 commit d76286c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/decap-cms/init.js.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{/* Register preview styles. */}}
{{- $css := resources.Get "decap-cms/scss/index.scss" }}
{{- $css = $css | toCSS (dict "targetPath" "css/decap-cms.css" "outputStyle" (cond hugo.IsProduction "compressed" "")) }}
{{- printf `CMS.registerPreviewStyle("%s");` $css.Permalink }}
{{- $widgets := slice }}
{{- range resources.Match "decap-cms/widgets/*.js" }}
{{- $name := replace .Name "decap-cms/widgets/" "" }}
Expand Down
Empty file.
1 change: 1 addition & 0 deletions assets/decap-cms/scss/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "custom";

0 comments on commit d76286c

Please sign in to comment.