<script type="text/javascript" src="/js/navbar.js"></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 }}
