Use RelPermalink

This commit is contained in:
BBaoVanC 2022-04-02 21:53:48 -05:00
parent 5d7e584ecf
commit 78e6aafa33
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 8 additions and 2 deletions

3
assets/css/commento.css Normal file
View File

@ -0,0 +1,3 @@
.commento-root * {
color: var(--text-normal);
}

View File

@ -4,17 +4,20 @@
</small>
</noscript>
{{ $url := .Permalink }}
{{ $url := .RelPermalink }}
{{ if .IsTranslated }}
{{ with index .AllTranslations 0 }}
{{ $url = .Permalink }}
{{ $url = .RelPermalink }}
{{ end }}
{{ end }}
{{ $css := resources.Get "css/commento.css" }}
<script defer
src="https://commento.bbaovanc.com/js/commento.js"
data-page-id="{{ $url }}"
data-css-override="{{ $css.Permalink }}"
></script>
<div id="commento"></div>