Posts with the tag Hugo

Generate URL cards when building your Hugo site on GitHub Actions

Hugo is known as a super-fast static site generator. It also has many functionaries such as shortcodes. However, it’s not good at dynamic processing because it can’t use remote files other than JSON or CSV. So we need an API server to generate link cards from URLs. Although, it’s wasteful to use a rental server and I also want to run it locally....

Use Disqus on multilingual Hugo site

The answer window.disqus_config = function() { this.language = '{{ .Lang }}'; } Why use window.disqus_config? According to the Disqus’ help page, we can override the language by adding this. var disqus_config = function () { this.language = "ja"; }; So basically the following JavaScript works. var disqus_config = function () { this....

Hugo adds unnecessary whitespace after a link

I’m running this blog with Hugo. I love it because it’s super fast and functional, but I had a problem. Issue example This is [test](https://example.com), just a [sample](https://sample.test) This would output… like this. It rendered unnecessary space before comma or period. Cause It was because layouts/_default/_markup/render-link.html ended with a newline....
menu
keyboard_arrow_up