Hugo

Hugo Server Bind IP

hugo server --bind=ip --baseURL=http://ip:1313

source:

Install Hugo On Ubuntu

wget https://github.com/gohugoio/hugo/releases/download/v0.81.0/hugo_extended_0.81.0_Linux-64bit.deb
sudo apt-get install ./hugo_extended_0.81.0_Linux-64bit.deb

source

Use New Archetype Create Post In Posts Folder

the archetype directory:

archetypes
├── default.md
└── question.md

I want to create a new post use question.md in ~\content\posts\question-2021-4.md, I will use order:

hugo new --kind question posts/"question-2021-4".md

source

Jekyll

When running GitHub action, error:

Dependency Error: Yikes! It looks like you don't have kramdown-parser-gfm or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- kramdown-parser-gfm' If you run into trouble, you can find helpful resources at jekyllrb.com/help/! 
  Conversion error: Jekyll::Converters::Markdown encountered an error while converting '_posts/2020-01-01-accordion.md':
                    kramdown-parser-gfm
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    kramdown-parser-gfm

Just add sth. to Gemfile:

gem "kramdown-parser-gfm"

Use Bundler 2 Or Greater With This Lockfile

source

warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)

To use Bundler 2 in your lockfile:

# update Rubygems
gem update --system
# update bundler
gem install bundler
# update Gemfile.lock in your project
bundler update --bundler

Gatsby

Change Default Package Manager

vim ~/.config/gatsby/config.json

Change:

"cli": {
        "packageManager": "npm"
}

to:

"cli": {
        "packageManager": "yarn"
}

source

Set Up Development Environment

Install Node.js(nvm), Git

sudo apt update
sudo apt -y upgrade
sudo apt-get install curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
npm install -g gatsby-cli

source:

  1. https://www.gatsbyjs.com/docs/tutorial/part-zero/#ubuntu-debian-and-other-apt-based-distros
  2. https://github.com/nvm-sh/nvm#install--update-script

Official Documentation