tpl/tplimpl: Replace deprecated .GetParam usage

Fixes #5834
This commit is contained in:
Bjørn Erik Pedersen 2019-04-09 16:39:12 +02:00
parent ee4274244b
commit 27a8049da7
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
2 changed files with 6 additions and 6 deletions

View file

@ -90,9 +90,9 @@ var EmbeddedTemplates = [][2]string{
{{ if .Site.DisqusShortname }}<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
{{with .GetParam "disqus_identifier" }}this.page.identifier = '{{ . }}';{{end}}
{{with .GetParam "disqus_title" }}this.page.title = '{{ . }}';{{end}}
{{with .GetParam "disqus_url" }}this.page.url = '{{ . | html }}';{{end}}
{{with .Params.disqus_identifier }}this.page.identifier = '{{ . }}';{{end}}
{{with .Params.disqus_title }}this.page.title = '{{ . }}';{{end}}
{{with .Params.disqus_url }}this.page.url = '{{ . | html }}';{{end}}
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {

View file

@ -3,9 +3,9 @@
{{ if .Site.DisqusShortname }}<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
{{with .GetParam "disqus_identifier" }}this.page.identifier = '{{ . }}';{{end}}
{{with .GetParam "disqus_title" }}this.page.title = '{{ . }}';{{end}}
{{with .GetParam "disqus_url" }}this.page.url = '{{ . | html }}';{{end}}
{{with .Params.disqus_identifier }}this.page.identifier = '{{ . }}';{{end}}
{{with .Params.disqus_title }}this.page.title = '{{ . }}';{{end}}
{{with .Params.disqus_url }}this.page.url = '{{ . | html }}';{{end}}
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {