Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 667 Bytes

README.md

File metadata and controls

58 lines (39 loc) · 667 Bytes

Bear Su's Blog

Render by Hugo.

Install Hugo

brew install hugo

Add Post

hugo new post/new-post.md

Local Test

make

Generate OG Image

Install dependency

go mod tidy

Build

make build_og_gen

Generate image

og_gen <post-file>

# for example
og_gen content/posts/2023-10-14-dry-initializer-gem.md

Output

2023/12/11 00:44:35 postTitle: dry-initializer 介紹
2023/12/11 00:44:35 OG Image Save to: static/images/2023-10-14/dry-initializer-gem.png

We can set the image to the post meta

images:
  - images/2023-10-14/dry-initializer-gem.png