Dev

Adding AdBlocker Detection to Your Hugo Blog with PaperMod Theme

In this blog post, we will learn how to add AdBlocker detection to your Hugo blog using the PaperMod theme. We will also include a simple warning message for users who have an ad-blocker enabled, encouraging them to disable it or whitelist your website. Overview Here’s a quick overview of the steps we will take: Create a custom CSS file to style the warning message. Create a JavaScript file to detect ad-blockers. Add a partial HTML file for the warning message. Extend the head and footer partials to include our new files. Step-by-step Guide 1. Create a custom CSS file Create a new file named custom_css.css under the assets/css/extended/ directory and paste the following CSS code: ...

March 24, 2023 · 2 min · 361 words · Juhyun Lee
한국어 日本語 简体中文 Bahasa Indonesia Español Français Português Tiếng Việt 繁體中文
Dev

Managing Multiple Node.js Environments with NVM

I. Overview Node Version Manager (NVM) is a useful tool for managing and switching between multiple Node.js versions. In this blog post, we’ll cover the most commonly used features of NVM, installation instructions for different platforms, and why it’s a valuable tool for developers. II. Installation macOS Using Homebrew: brew install nvm mkdir ~/.nvm Add the following lines to your .bash_profile, .zshrc, or other shell configuration file: export NVM_DIR="$HOME/.nvm" [ -s "$(brew --prefix)/opt/nvm/nvm.sh" ] && . "$(brew --prefix)/opt/nvm/nvm.sh" # This loads nvm [ -s "$(brew --prefix)/opt/nvm/etc/bash_completion" ] && . "$(brew --prefix)/opt/nvm/etc/bash_completion" # This loads nvm bash_completion Linux and other Unix-based systems Using curl: ...

March 18, 2023 · 3 min · 451 words · Juhyun Lee
한국어 日本語 简体中文 Bahasa Indonesia Español Français Português Tiếng Việt 繁體中文