An open API service indexing awesome lists of open source software.

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

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
```