Skip to content

Commit 893bc87

Browse files
committed
docs(guide): 업데이트 날짜 표시하기 추가
1 parent 2a7536c commit 893bc87

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

9.24 KB
Loading

content/posts/hugo-blog-guide/index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,30 @@ draft: true
4545
- `Archetypes`를 사용하면 명령어로 만들어지는 기본 템플릿도 수정할 수 있다. 자신의 환경에 맞게 수정한다.
4646
- `yaml`, `toml`, `json` 형식을 지원한다. 가장 대중적으로 사용하는 `yaml` 형식을 추천한다.
4747

48+
## 2. 업데이트 날짜 표시하기
49+
50+
### 2.1 Front matter 수정하기
51+
52+
> [!INFO] config/_default/params.toml 수정
53+
54+
![업데이트 날짜 표시하기(front matter 수정)](img/show-date-updated.png "업데이트 날짜 표시하기")
55+
56+
- `showDateUpdated` 옵션의 값을 `true`로 수정한다.
57+
58+
### 2.2 수정 날짜 자동으로 추가하기(feat. Git)
59+
60+
> [!INFO] config/_default/hugo.toml 수정
61+
62+
- `enableGitInfo = true`를 추가한다.
63+
- 옵션을 추가하지 않으면 front matter를 직접 수정해야 하는 번거로움이 발생한다.
64+
4865
## 마치며
4966

5067
### 참고 자료
5168

5269
- [Archetypes](https://gohugo.io/content-management/archetypes/)
70+
- [Lastmod](https://gohugo.io/methods/page/lastmod/)
71+
- [Gitinfo](https://gohugo.io/methods/page/gitinfo/)
5372

5473
[^1]: https://www.jetbrains.com/help/idea/using-live-templates.html
5574
[^2]: https://code.visualstudio.com/docs/editing/userdefinedsnippets

0 commit comments

Comments
 (0)