mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
A sample config: ```toml defaultContentLanguage = "en" defaultContentLanguageInSubdir = true [Languages] [Languages.en] weight = 10 title = "In English" languageName = "English" contentDir = "content/english" [Languages.nn] weight = 20 title = "På Norsk" languageName = "Norsk" contentDir = "content/norwegian" ``` The value of `contentDir` can be any valid path, even absolute path references. The only restriction is that the content dirs cannot overlap. The content files will be assigned a language by 1. The placement: `content/norwegian/post/my-post.md` will be read as Norwegian content. 2. The filename: `content/english/post/my-post.nn.md` will be read as Norwegian even if it lives in the English content folder. The content directories will be merged into a big virtual filesystem with one simple rule: The most specific language file will win. This means that if both `content/norwegian/post/my-post.md` and `content/english/post/my-post.nn.md` exists, they will be considered duplicates and the version inside `content/norwegian` will win. Note that translations will be automatically assigned by Hugo by the content file's relative placement, so `content/norwegian/post/my-post.md` will be a translation of `content/english/post/my-post.md`. If this does not work for you, you can connect the translations together by setting a `translationKey` in the content files' front matter. Fixes #4523 Fixes #4552 Fixes #4553
148 lines
2.6 KiB
TOML
148 lines
2.6 KiB
TOML
|
|
|
|
[[constraint]]
|
|
name = "github.com/BurntSushi/toml"
|
|
branch = "master"
|
|
|
|
[[constraint]]
|
|
name = "github.com/PuerkitoBio/purell"
|
|
version = "1.1.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/alecthomas/chroma"
|
|
branch = "master"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "github.com/bep/gitmap"
|
|
|
|
[[constraint]]
|
|
name = "github.com/chaseadamsio/goorgeous"
|
|
version = "^1.1.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/disintegration/imaging"
|
|
version = "~v1.2.4"
|
|
|
|
[[constraint]]
|
|
name = "github.com/magefile/mage"
|
|
version = "v1"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "github.com/eknkc/amber"
|
|
|
|
[[constraint]]
|
|
name = "github.com/fortytw2/leaktest"
|
|
version = "1.1.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/fsnotify/fsnotify"
|
|
version = "^1.4.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/gorilla/websocket"
|
|
version = "1.2.0"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "github.com/hashicorp/go-immutable-radix"
|
|
|
|
[[constraint]]
|
|
name = "github.com/jdkato/prose"
|
|
version = "1.1.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/kyokomi/emoji"
|
|
version = "1.5.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/markbates/inflect"
|
|
revision = "a12c3aec81a6a938bf584a4bac567afed9256586"
|
|
|
|
[[constraint]]
|
|
name = "github.com/miekg/mmark"
|
|
version = "^1.3.6"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "github.com/mitchellh/mapstructure"
|
|
|
|
[[constraint]]
|
|
name = "github.com/nicksnyder/go-i18n"
|
|
version = "^1.10.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/russross/blackfriday"
|
|
branch = "master"
|
|
|
|
[[constraint]]
|
|
name = "github.com/spf13/afero"
|
|
version = "^1.1.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/spf13/cast"
|
|
version = "^1.1.0"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "github.com/spf13/cobra"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "github.com/spf13/fsync"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "github.com/spf13/jwalterweatherman"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "github.com/spf13/nitro"
|
|
|
|
[[constraint]]
|
|
name = "github.com/spf13/pflag"
|
|
version = "1.0.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/spf13/viper"
|
|
version = "1.0.0"
|
|
|
|
[[constraint]]
|
|
name = "github.com/stretchr/testify"
|
|
version = "1.1.4"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "github.com/olekukonko/tablewriter"
|
|
|
|
[[constraint]]
|
|
name = "github.com/yosssi/ace"
|
|
version = "^0.0.5"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "golang.org/x/image"
|
|
|
|
[[constraint]]
|
|
branch = "master"
|
|
name = "golang.org/x/text"
|
|
|
|
[[constraint]]
|
|
branch = "v2"
|
|
name = "gopkg.in/yaml.v2"
|
|
|
|
[[constraint]]
|
|
name = "github.com/gobwas/glob"
|
|
version = "0.2.2"
|
|
|
|
|
|
[[constraint]]
|
|
name = "github.com/muesli/smartcrop"
|
|
branch = "master"
|
|
|
|
|
|
[[constraint]]
|
|
name = "github.com/sanity-io/litter"
|
|
version = "1.1.0"
|