https://github.com/timfanda35/timfanda35.github.io
Bear Su's blog
https://github.com/timfanda35/timfanda35.github.io
blog hugo
Last synced: 4 months ago
JSON representation
Bear Su's blog
- Host: GitHub
- URL: https://github.com/timfanda35/timfanda35.github.io
- Owner: timfanda35
- Created: 2014-05-20T11:08:17.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2025-12-25T09:15:24.000Z (6 months ago)
- Last Synced: 2025-12-26T22:23:57.350Z (6 months ago)
- Topics: blog, hugo
- Language: HTML
- Homepage: https://blog.bear-su.dev
- Size: 36.1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bear Su's Blog
Render by [Hugo](https://gohugo.io/).
Install Hugo
```
brew install hugo
```
Add Post
```bash
hugo new post/new-post.md
```
Local Test
```bash
make
```
## Generate OG Image
Install dependency
```bash
go mod tidy
```
Build
```bash
make build_og_gen
```
Generate image
```bash
og_gen
# for example
og_gen content/posts/2023-10-14-dry-initializer-gem.md
```
Output
```bash
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
```yaml
images:
- images/2023-10-14/dry-initializer-gem.png
```