Use RelPermalink

This commit is contained in:
2022-04-02 21:53:48 -05:00
parent 5d7e584ecf
commit 78e6aafa33
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> </small>
</noscript> </noscript>
{{ $url := .Permalink }} {{ $url := .RelPermalink }}
{{ if .IsTranslated }} {{ if .IsTranslated }}
{{ with index .AllTranslations 0 }} {{ with index .AllTranslations 0 }}
{{ $url = .Permalink }} {{ $url = .RelPermalink }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ $css := resources.Get "css/commento.css" }}
<script defer <script defer
src="https://commento.bbaovanc.com/js/commento.js" src="https://commento.bbaovanc.com/js/commento.js"
data-page-id="{{ $url }}" data-page-id="{{ $url }}"
data-css-override="{{ $css.Permalink }}"
></script> ></script>
<div id="commento"></div> <div id="commento"></div>