Fix warning about .BaseFileName on zero object
This commit is contained in:
parent
8013038a72
commit
7967eb3b49
@ -1,17 +1,19 @@
|
||||
<script type="text/javascript" src="/js/navbar.js"></script>
|
||||
|
||||
{{ $page_id := .File.BaseFileName }}
|
||||
{{ if .Site.Params.comments.webmention }}
|
||||
{{ $webmention_js := resources.Get "js/webmention.js" | minify }}
|
||||
<script src="{{ $webmention_js.RelPermalink }}"
|
||||
data-page-url="{{ .Permalink }}"
|
||||
async></script>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.comments.cactus }}
|
||||
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"
|
||||
data-default-homeserver-url="https://matrix.cactus.chat:8448"
|
||||
data-server-name="cactus.chat"
|
||||
data-site-name="{{ . }}"
|
||||
data-node="#cactus-comments"
|
||||
data-comment-section-id="{{ $page_id }}"></script>
|
||||
{{ if .File }}
|
||||
{{ $page_id := .File.BaseFileName }}
|
||||
{{ if .Site.Params.comments.webmention }}
|
||||
{{ $webmention_js := resources.Get "js/webmention.js" | minify }}
|
||||
<script src="{{ $webmention_js.RelPermalink }}"
|
||||
data-page-url="{{ .Permalink }}"
|
||||
async></script>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.comments.cactus }}
|
||||
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"
|
||||
data-default-homeserver-url="https://matrix.cactus.chat:8448"
|
||||
data-server-name="cactus.chat"
|
||||
data-site-name="{{ . }}"
|
||||
data-node="#cactus-comments"
|
||||
data-comment-section-id="{{ $page_id }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user