Skip to content

Commit

Permalink
fix: rename js_url with _js_url (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Jan 27, 2024
1 parent c9b7fe8 commit 443b829
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ notAlternative = true
mediaType = "application/yaml"

[params.decap_cms]
js_url = ""
_js_url = ""
# local_backend = false
publish_mode = "editorial_workflow"
media_folder = "static/images/uploads"
Expand Down
6 changes: 6 additions & 0 deletions layouts/partials/decap-cms/script.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{{- $jsURL := default "" site.Params.decap_cms._js_url }}
{{/* TODO: remove js_url parameter. */}}
{{- with site.Params.decap_cms.js_url }}
{{- warnf "[decap-cms] js_url is deprecated, use _js_url instead." }}
{{- $jsURL = . }}
{{- end }}
{{- with $jsURL }}
<script src="{{ . }}"></script>
{{- else }}
{{- $js := resources.Get "decap-cms/index.js" }}
Expand Down

0 comments on commit 443b829

Please sign in to comment.