Remove Tutorials section

Closes rdwatters/hugo-docs-concept#15
This commit is contained in:
Ryan Watters 2017-03-12 18:30:38 -05:00
parent a5a7e87346
commit a4f76cfca0
4 changed files with 50 additions and 8 deletions

View File

@ -59,7 +59,7 @@ Only the obvious non-global options can be overridden per language. Examples of
## Taxonomies and Blackfriday
Taxonomies and [Blackfriday configuration][hugoconfig] can also be set per language:
Taxonomies and [Blackfriday configuration][config] can also be set per language:
{{% code file="bf-config.toml" %}}
@ -178,6 +178,35 @@ To track down missing translation strings, run Hugo with the `--i18n-warnings` f
i18n|MISSING_TRANSLATION|en|wordCount
```
## Customize Dates
At the time of this writing, Golang does not yet have support for internationalized locales, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content:
~~~toml
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"
~~~
... then index the non-English date names in your templates like so:
~~~html
<time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
Article publié le {{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }} (dernière modification le {{ .Lastmod.Day }} {{ index $.Site.Data.mois (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }})
</time>
~~~
This technique extracts the day, month and year by specifying ``.Date.Day``, ``.Date.Month``, and ``.Date.Year``, and uses the month number as a key, when indexing the month name data file.
## Menus
You can define your menus for each language independently. The [creation of a menu][menus] works analogous to earlier versions of Hugo, except that they have to be defined in their language-specific block in the configuration file:

View File

@ -0,0 +1,13 @@
---
date: 2017-03-12T13:14:14+08:00
description: "Personal blog of Rosen Lu"
license: ""
licenseLink: ""
sitelink: http://lucumt.info/posts
sourceLink: https://github.com/lucumt/ghblog
tags:
- personal
- blog
image: lucumt.jpg
title: 飞狐的部落格
---

View File

@ -54,13 +54,13 @@ hostinganddeployment:
haschildren: true
sortsubpagesby: "weight"
desc: "Site builds, automated deployments, and popular hosting solutions, as explained by the Hugo community"
tutorials:
order: 9
title: "Tutorials"
url: "tutorials"
haschildren: true
sortsubpagesby: "weight"
desc: "Community-aggregated articles and code examples for approaching different projects with Hugo"
# tutorials:
# order: 9
# title: "Tutorials"
# url: "tutorials"
# haschildren: true
# sortsubpagesby: "weight"
# desc: "Community-aggregated articles and code examples for approaching different projects with Hugo"
tools:
order: 10
title: "Developer Tools"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB