At the time of this writing, Go does not yet have support for internationalized locales for dates, if you create a month.yaml in your data/ folder with a content like shown below. It will work. 1: "janvier" 2: "février" 3: "mars" 4: "avril" 5: "mai" 6: "juin" 7: "juillet" 8: "août" 9: "septembre" 10: "octobre" 11: "novembre" 12: "décembre"pull/3/head
@@ -12,6 +12,7 @@ Crisp, minimal personal website and blog theme Hugo. Forked from [Ezhil](https:/ | |||
* Disqus comments | |||
* RSS feeds | |||
* Custom CSS/JS | |||
* Multilingual months support | |||
## Installation | |||
@@ -39,6 +40,30 @@ type: "page" | |||
This is some static page where you can write about yourself. | |||
``` | |||
## Language Settings for the month | |||
Due to the currently unavailable feature for multilingual dates in ``.Date`` from | |||
Go. It is possible to create a ``month.yaml`` in the data folder of your | |||
Hugo site root directoy. There is also an example file in | |||
``exampleSite/data/``. | |||
```sh | |||
cat > month.yaml << EOF | |||
1: "Jan" | |||
2: "Feb" | |||
3: "Mar" | |||
4: "Apr" | |||
5: "May" | |||
6: "Jun" | |||
7: "Jul" | |||
8: "Aug" | |||
9: "Sep" | |||
10: "Oct" | |||
11: "Nov" | |||
12: "Dec" | |||
EOF | |||
``` | |||
## Credits | |||
* [Ezhil theme](https://github.com/vividvilla/ezhil) from which Ink was forked |
@@ -0,0 +1,12 @@ | |||
1: "Jan" | |||
2: "Feb" | |||
3: "Mar" | |||
4: "Apr" | |||
5: "May" | |||
6: "Jun" | |||
7: "Jul" | |||
8: "Aug" | |||
9: "Sep" | |||
10: "Oct" | |||
11: "Nov" | |||
12: "Dec" |
@@ -21,7 +21,7 @@ | |||
<div class="meta"> | |||
<div class="date"> | |||
<span class="day">{{ dateFormat "02" .Date }}</span> | |||
<span class="rest">{{ dateFormat "Jan 2006" .Date }}</span> | |||
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span> | |||
</div> | |||
</div> | |||
<div class="matter"> |
@@ -11,7 +11,7 @@ | |||
<div class="meta"> | |||
<div class="date"> | |||
<span class="day">{{ dateFormat "02" .Date }}</span> | |||
<span class="rest">{{ dateFormat "Jan 2006" .Date }}</span> | |||
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span> | |||
</div> | |||
</div> | |||
{{ end }} |
@@ -15,7 +15,7 @@ | |||
<div class="meta"> | |||
<div class="date"> | |||
<span class="day">{{ dateFormat "02" .Date }}</span> | |||
<span class="rest">{{ dateFormat "Jan 2006" .Date }}</span> | |||
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span> | |||
</div> | |||
</div> | |||
<div class="matter"> |