From bdadd84af109a9ce537821f2d3194fa16a7958c4 Mon Sep 17 00:00:00 2001 From: Cassio Batista Date: Wed, 12 Jun 2019 11:29:03 -0300 Subject: [PATCH 1/4] doc: multilingual instructions included on README --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 63657e9..8b8c04a 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,32 @@ This can be achieved by running the next command prior to calling Hugo: ``` See at [xor-gate/xor-gate.org](https://github.com/xor-gate/xor-gate.org) an example of how to add it to a continuous integration system. + +### Multilingual + +To allow Beautiful Hugo to go Multiliguagual you need to define the languages +you want to use inside the `languages` param on `config.toml` file: + +```toml +[languages] + [languages.en] + contentDir = "content/en" + [languages.ja] + contentDir = "content/ja" + [languages.br] + contentDir = "content/pt" +``` + +Now you just need to create a subdir within the `content/` folder for each +language you want to use and just put stuff inside `page/` and `post/` regular +dirs. +``` +content/ content/ content/ +└── en └── br └── ja +    ├── page ├── page    ├── page +    └── post └── post    └── post + +``` ### Extra shortcodes From 2fb23860767ca2aa02000947dcd3ec13cae6994f Mon Sep 17 00:00:00 2001 From: Cassio Batista Date: Wed, 12 Jun 2019 11:37:28 -0300 Subject: [PATCH 2/4] doc: improving multilingual instructions --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8b8c04a..09a5b58 100644 --- a/README.md +++ b/README.md @@ -124,22 +124,23 @@ See at [xor-gate/xor-gate.org](https://github.com/xor-gate/xor-gate.org) an exam ### Multilingual -To allow Beautiful Hugo to go Multiliguagual you need to define the languages -you want to use inside the `languages` param on `config.toml` file: +To allow Beautiful Hugo to go multilingual you need to define the languages +you want to use inside the `languages` parameter on `config.toml` file, also +redefining the content dir for each one. Check the `i18n/` folder to see all +languages available. ```toml [languages] [languages.en] - contentDir = "content/en" + contentDir = "content/en" # English [languages.ja] - contentDir = "content/ja" + contentDir = "content/ja" # Japanese [languages.br] - contentDir = "content/pt" + contentDir = "content/br" # Brazilian Portuguese ``` Now you just need to create a subdir within the `content/` folder for each -language you want to use and just put stuff inside `page/` and `post/` regular -dirs. +language and just put stuff inside `page/` and `post/` regular directory. ``` content/ content/ content/ └── en └── br └── ja From 563f34e618fbe1b55177be36908d606bcbf5b70e Mon Sep 17 00:00:00 2001 From: Cassio Batista Date: Wed, 12 Jun 2019 11:39:28 -0300 Subject: [PATCH 3/4] doc: multilingual subject-verb agreement on description :) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09a5b58..36946ec 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ See at [xor-gate/xor-gate.org](https://github.com/xor-gate/xor-gate.org) an exam ### Multilingual -To allow Beautiful Hugo to go multilingual you need to define the languages +To allow Beautiful Hugo to go multilingual, you need to define the languages you want to use inside the `languages` parameter on `config.toml` file, also redefining the content dir for each one. Check the `i18n/` folder to see all languages available. @@ -140,7 +140,7 @@ languages available. ``` Now you just need to create a subdir within the `content/` folder for each -language and just put stuff inside `page/` and `post/` regular directory. +language and just put stuff inside `page/` and `post/` regular directories. ``` content/ content/ content/ └── en └── br └── ja From 7cc01ccfb1bdfcf12d26f000d423a78fdaef536b Mon Sep 17 00:00:00 2001 From: Cassio Batista Date: Wed, 12 Jun 2019 11:42:49 -0300 Subject: [PATCH 4/4] doc: multilingual tree subfolders now end-dashed --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 36946ec..b386e99 100644 --- a/README.md +++ b/README.md @@ -143,9 +143,9 @@ Now you just need to create a subdir within the `content/` folder for each language and just put stuff inside `page/` and `post/` regular directories. ``` content/ content/ content/ -└── en └── br └── ja -    ├── page ├── page    ├── page -    └── post └── post    └── post +└── en/ └── br/ └── ja/ +    ├── page/ ├── page/    ├── page/ +    └── post/ └── post/    └── post/ ```