Skip to content

levarc-hub/blog

Repository files navigation

Hugo blog template

Initial configuration

# create site templates in empty folder
hugo new site blog --format yaml

# install and update PaperMod theme
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git blog/themes/PaperMod
git submodule update --init --recursive

Create local dev environment

# install precommit hook (local validations)
make precommit

# configure your auth and signing in ~/.ssh folder and .gitconfig
/home/<user>/.ssh
├── allowed_signers
├── config
├── github_ed25519
└── known_hosts

/home/<user>/.gitconfig
└── git_config

# Create local environment in devcontainer:
# tap in left down corner (remote type)
- Reopen in Container # look at build logs 

# container config change or rebuild:
Ctrl + Shift + P: Dev Containers: Rebuild Container (opt: without Cache)

Development

# check stack versions
make verify

# create post from archetype: archetypes/post.md
make new-post
make new-page

# local server run
make serve
# Web Server is available at http://localhost:1313/

# add/commit/push alias
git cmp "feat: new blog feature" # feat/fix/chore - named commits used in changelog filtering

# deploy new release(create and push new tag) to github-pages
make release

Utilities

# Create icons and covers/labels for site with ImageMagick
convert --version
convert favicon.png -define icon:auto-resize=64,48,32,16 favicon.ico
convert post-cover.png -resize 960x post-cover.png
convert label.png -resize 200x label.png
convert site-icon.png -resize 40x40 site-icon.png

# Windows /Pictures and /Documents folder binds here:
ls $HOME/Pictures $HOME/Documents

# Example to copy picture from Windows folder
cp $HOME/Pictures/profile/profile.png blog/content/about

About

My Hugo blog

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •