Created
January 13, 2018 15:32
-
-
Save ishikawa/7f06898826b66176150626f780f90d67 to your computer and use it in GitHub Desktop.
How to print Japanese weekdays in Hugo frontmatter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+++ | |
date = {{ .Date }} | |
title = "{{ $t := now }}{{ $t.Format "1月2日"}}{{ if eq ($t.Weekday) 0 }}(日){{ end }}{{ if eq ($t.Weekday) 1 }}(月){{ end }}{{ if eq ($t.Weekday) 2 }}(火){{ end }}{{ if eq ($t.Weekday) 3 }}(水){{ end }}{{ if eq ($t.Weekday) 4 }}(木){{ end }}{{ if eq ($t.Weekday) 5 }}(金){{ end }}{{ if eq ($t.Weekday) 6 }}(土){{ end }}" | |
+++ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment