Rename CSV option from comma to delimiter

See #5555
This commit is contained in:
Bjørn Erik Pedersen
2018-12-23 21:08:12 +01:00
parent 2efc1a64c3
commit ce06bdb16a
6 changed files with 14 additions and 15 deletions

View File

@@ -343,12 +343,11 @@ Publish 2: {{ $cssPublish2.Permalink }}
b.WithTemplates("home.html", `
{{ $toml := "slogan = \"Hugo Rocks!\"" | resources.FromString "slogan.toml" | transform.Unmarshal }}
{{ $csv1 := "\"Hugo Rocks\",\"Hugo is Fast!\"" | resources.FromString "slogans.csv" | transform.Unmarshal }}
{{ $csv2 := "a;b;c" | transform.Unmarshal (dict "comma" ";") }}
{{ $csv2 := "a;b;c" | transform.Unmarshal (dict "delimiter" ";") }}
Slogan: {{ $toml.slogan }}
CSV1: {{ $csv1 }} {{ len (index $csv1 0) }}
CSV2: {{ $csv2 }}
CSV2: {{ $csv2 }}
`)
}, func(b *sitesBuilder) {
b.AssertFileContent("public/index.html",