Merge pull request #435 from cjeller1592/lang-metadata

Add conditional for preserving lang metadata
pull/450/head
Matt Baer 4 years ago committed by GitHub
commit e58e457b25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      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 }}

Loading…
Cancel
Save