Headers can be animated easily by CSS and a few JavaScript, but the speed will be constant. I hate that, so I’ll create a header that works naturally like this.
Sample code & Demo See the Pen Awesome header by Akimo (@akimon658) on CodePen. This script changes the value of top by scrolling....
Mar 18, 2022
Mar 20, 2022
Golang Go’s cookiejar doesn’t have any function to persistence cookies, so you need to do something to save cookies to a local file. To make it easy, you can use juju/persistent-cookiejar instead.
...
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....
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....
Jan 25, 2022
Jan 26, 2022
Hugo 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....
Dec 31, 2021
How do you usually do when you need to authorize using the browser in WSL? Copy the token? Or use WSLg? These ways are not wrong, but it will be better to use the host’s browser.
Here is how to set it:
sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser path/to/browser priority Example:...
Dec 13, 2021
Mar 2, 2022
PowerShell displays the current full path by default. It’s long, so I’d like to replace it with ~ like Bash.
Prepare a profile You can customize your PowerShell with $profile. It doesn’t exist by default, so you need to run touch $profile.
Customize To customize the prompt, use function prompt. Here is a built-in one....