2 Commits

Author SHA1 Message Date
78e6aafa33 Use RelPermalink 2022-04-02 21:53:48 -05:00
5d7e584ecf Switch comments to Commento 2022-04-02 21:31:49 -05:00
7 changed files with 28 additions and 81 deletions

View File

@ -52,10 +52,10 @@ than an entire essay with the same amount of information.
## Building
## Automatic deploy previews with GitHub Actions
## Automatic deploy previews with Netlify
My GitHub Actions workflows will automatically build each pull request into a
public deploy preview on demo.bbaovanc.com, and will link it in a comment.
Netlify will automatically build each pull request into a public deploy preview,
and will link it in a comment.
## Manual (local) building

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

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

View File

@ -4,7 +4,7 @@ defaultContentLanguage: en
copyright: '&copy; 2021 bbaovanc <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>'
sectionPagesMenu: main
enableRobotsTXT: true
paginate: 10
paginate: 5
enableGitInfo: true
taxonomies:
@ -31,9 +31,6 @@ params:
gitFileURL: https://github.com/BBaoVanC/bbaovanc.com/blob/master
gitFileIcon: code
talkyardServerUrl: "https://talkyard.bbaovanc.com"
talkyardScriptUrl: "https://talkyard.bbaovanc.com/-/talkyard-comments.min.js"
# see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings
# you probably want to keep this default
privacy:

View File

@ -1,39 +0,0 @@
---
title: Substitución de texto en Discord con `sed`
date: 2021-03-25T18:48:15-05:00
toc: false
comments: true
authors:
- bbaovanc
tags:
- tutorial
- discord
- discord-tricks
resources:
- name: feature
src: example.mov
title: Video ejemplo
---
Discord permite usar sintaxis `sed` para reemplazar texto.
<!--more-->
## Tutorial
Si envias un mensaje con el formato de `sed` (`s/texto viejo/texto nuevo`),
Discord ejecutará en el último mensaje que enviaste.
## Advertencía
- No permite regex
- No puede reemplazar globamente
*Esto entrada de blog fue adaptado de [gitea:bbaovanc/discord-tricks][1]*
[1]: https://git.bbaovanc.com/bbaovanc/discord-tricks

View File

@ -1,3 +0,0 @@
{{ if eq .Site.BaseURL "https://bbaovanc.com" }}
<script defer data-domain="bbaovanc.com" src="https://plausible.bbaovanc.com/js/bobalytics.js"></script>
{{ end }}

View File

@ -1,34 +1,23 @@
{{ if ne .Site.BaseURL "https://bbaovanc.com" }}
<i>Comment section is not available during development previews.</i>
{{ else }}
<noscript>
<small>
<i>Enable JavaScript to see the comment section.</i>
</small>
</noscript>
<noscript>
<small>
<i>Enable JavaScript to see the comment section.</i>
</small>
</noscript>
{{ $id := "" }}
{{ with .Params.discussionId }}
{{ $id = . }}
{{ else }}
{{ if .IsTranslated }}
{{ with index .AllTranslations 0 }}
{{ $id = .Permalink }}
{{ end }}
{{ else }}
{{ $id = .Permalink }}
{{ end }}
{{ $url := .RelPermalink }}
{{ if .IsTranslated }}
{{ with index .AllTranslations 0 }}
{{ $url = .RelPermalink }}
{{ end }}
<script>talkyardServerUrl='{{ .Site.Params.talkyardServerUrl }}';</script>
<script async defer src="{{ .Site.Params.talkyardScriptUrl }}"></script>
<!-- You can specify a per page discussion id on the next line, if your URLs might change. -->
<div class="talkyard-comments" data-discussion-id="{{ $id }}" style="margin-top: 45px;">
</div>
<div class="comments-footer" style="text-align: right;">
<small>
<p style="margin: 0;">Comments powered by <a href="https://www.talkyard.io">Talkyard</a>.</p>
<p style="margin: 0;">Discussion ID: <code>{{ $id }}</code></p>
</small>
</div>
{{ 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>