diff --git a/templates/pad.tmpl b/templates/pad.tmpl index cef69b5..049ac27 100644 --- a/templates/pad.tmpl +++ b/templates/pad.tmpl @@ -194,8 +194,13 @@ body: post.content, title: post.title, font: font, - lang: lang - }; + {{ if or .Post.Slug .Post.Id }} + }; + {{ else }} + lang: lang + }; + {{ end }} + {{ if .Post.Slug }} var url = "/api/collections/{{.EditCollection.Alias}}/posts/{{.Post.Id}}"; {{ else if .Post.Id }}