From e3dc5c5723ecff8ea6a7fc5e70555e27280223e6 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Tue, 19 Nov 2019 23:56:45 +0100 Subject: #99, Move translations to separate content folders --- exampleSite/config.toml | 10 +++-- exampleSite/config.yaml | 10 +++-- exampleSite/content.cn/_index.md | 79 ++++++++++++++++++++++++++++++++++++++++ exampleSite/content.ru/_index.md | 79 ++++++++++++++++++++++++++++++++++++++++ exampleSite/content/_index.cn.md | 79 ---------------------------------------- exampleSite/content/_index.ru.md | 79 ---------------------------------------- 6 files changed, 172 insertions(+), 164 deletions(-) create mode 100644 exampleSite/content.cn/_index.md create mode 100644 exampleSite/content.ru/_index.md delete mode 100644 exampleSite/content/_index.cn.md delete mode 100644 exampleSite/content/_index.ru.md diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 27e1b13..eeaabea 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -13,20 +13,24 @@ enableGitInfo = true # pygmentsStyle = 'monokailight' pygmentsCodeFences = true -# Multilang config -defaultContentLanguage = 'en' - +# Multi-lingual mode config +# There are different options to translate files +# See https://gohugo.io/content-management/multilingual/#translation-by-filename +# And https://gohugo.io/content-management/multilingual/#translation-by-content-directory [languages] [languages.en] languageName = 'English' + contentDir = 'content' weight = 1 [languages.ru] languageName = 'Russian' + contentDir = 'content.ru' weight = 2 [languages.cn] languageName = 'Chinese' + contentDir = 'content.cn' weight = 3 [params] diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 3d8dedc..90ab3f1 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -13,18 +13,22 @@ enableGitInfo: true # pygmentsStyle: monokailight pygmentsCodeFences: true -# Multilang config -defaultContentLanguage: en - +# Multi-lingual mode config +# There are different options to translate files +# See https://gohugo.io/content-management/multilingual/#translation-by-filename +# And https://gohugo.io/content-management/multilingual/#translation-by-content-directory languages: en: languageName: English + contentDir: content weight: 1 ru: languageName: Russian + contentDir: content.ru weight: 2 cn: languageName: Chinese + contentDir: content.cn weight: 3 params: diff --git a/exampleSite/content.cn/_index.md b/exampleSite/content.cn/_index.md new file mode 100644 index 0000000..3e99823 --- /dev/null +++ b/exampleSite/content.cn/_index.md @@ -0,0 +1,79 @@ +--- +title: 介绍 +type: docs +--- + +# 中文索引页 + +{{< columns >}} +## Astris ipse furtiva + +Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut +olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis, +modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies + +<---> + +## Suis quot vota + +Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat: +miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod +nunc! Fragosis suae dextra geruntur functus vulgata. +{{< /columns >}} + + +## Tempora nisi nunc + +Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei, +tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis +sequens! + + var panel = ram_design; + if (backup + system) { + file.readPoint = network_native; + sidebar_engine_device(cell_tftp_raster, + dual_login_paper.adf_vci.application_reader_design( + graphicsNvramCdma, lpi_footer_snmp, integer_model)); + } + public_keyboard_docking += error.controller_gibibyte_plug.ip(4, + asciiPetaflops, software(supercomputer_compatible_status + 4)); + dynamic_disk.indexModeLaptop = bufferTftpReality; + var export_vlog_sequence = trinitron_flowchart + supercomputer_cluster_rj( + -1, toolbar_powerpoint_query, -2 / multiprocessing_impression); + +## Locis suis novi cum suoque decidit eadem + +Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? Venit spes +versus finis sermonibus patefecit murum nec est sine oculis. _Ille_ inmota +macies domoque caelestia cadit tantummodo scelus procul, corde! + +1. Dolentem capi parte rostro alvum habentem pudor +2. Fulgentia sanguine paret +3. E punior consurgit lentus +4. Vox hasta eras micantes + +## Facibus pharetrae indetonsusque indulsit sic incurrite foliis + +Nefandam et prisci palmas! Blandita cutis flectitur montis macies, te _nati_ +Latiis; turbaque inferias. Virginis tibi peracta avidusque facies caper nec, e +at ademptae, mira. + + direct *= font(inputScareware(sliHome), crossplatform.byte( + ppl_encryption.excel_e_rte(integratedModelModifier), timeVirtual, + floating_speakers.media_printer(us, yahoo, primaryPhp))); + friendly_metal_flatbed(cd, isoPrimaryStorage(reader), dmaMirrored); + if (parse_flash_cron.metalGif(1, adServiceDevice, utility)) { + adf -= operation_cdma_samba; + imapGif.switch += torrent; + } else { + pmu.disk_captcha = digital_ppp_pci + recursionTransistor(5, dram); + ajax_service += grayscalePythonLock; + google_scroll_capacity = ftp + engine_dslam_sidebar / tape - 1; + } + drive_rw = zipTftp; + var suffix = software_router_extension.dimm_ddr(-5, + kernel_digital_minisite); + +Vocavit toto; alas **mitis** maestus in liquidarum ab legi finitimosque dominam +tibi subitus; Orionis vertitur nota. Currere alti etiam seroque cernitis +innumeris miraturus amplectique collo sustinet quemque! Litora ante turba? diff --git a/exampleSite/content.ru/_index.md b/exampleSite/content.ru/_index.md new file mode 100644 index 0000000..8fa610a --- /dev/null +++ b/exampleSite/content.ru/_index.md @@ -0,0 +1,79 @@ +--- +title: Введение +type: docs +--- + +# Стартовая страница на русском языке + +{{< columns >}} +## Astris ipse furtiva + +Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut +olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis, +modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies + +<---> + +## Suis quot vota + +Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat: +miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod +nunc! Fragosis suae dextra geruntur functus vulgata. +{{< /columns >}} + + +## Tempora nisi nunc + +Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei, +tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis +sequens! + + var panel = ram_design; + if (backup + system) { + file.readPoint = network_native; + sidebar_engine_device(cell_tftp_raster, + dual_login_paper.adf_vci.application_reader_design( + graphicsNvramCdma, lpi_footer_snmp, integer_model)); + } + public_keyboard_docking += error.controller_gibibyte_plug.ip(4, + asciiPetaflops, software(supercomputer_compatible_status + 4)); + dynamic_disk.indexModeLaptop = bufferTftpReality; + var export_vlog_sequence = trinitron_flowchart + supercomputer_cluster_rj( + -1, toolbar_powerpoint_query, -2 / multiprocessing_impression); + +## Locis suis novi cum suoque decidit eadem + +Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? Venit spes +versus finis sermonibus patefecit murum nec est sine oculis. _Ille_ inmota +macies domoque caelestia cadit tantummodo scelus procul, corde! + +1. Dolentem capi parte rostro alvum habentem pudor +2. Fulgentia sanguine paret +3. E punior consurgit lentus +4. Vox hasta eras micantes + +## Facibus pharetrae indetonsusque indulsit sic incurrite foliis + +Nefandam et prisci palmas! Blandita cutis flectitur montis macies, te _nati_ +Latiis; turbaque inferias. Virginis tibi peracta avidusque facies caper nec, e +at ademptae, mira. + + direct *= font(inputScareware(sliHome), crossplatform.byte( + ppl_encryption.excel_e_rte(integratedModelModifier), timeVirtual, + floating_speakers.media_printer(us, yahoo, primaryPhp))); + friendly_metal_flatbed(cd, isoPrimaryStorage(reader), dmaMirrored); + if (parse_flash_cron.metalGif(1, adServiceDevice, utility)) { + adf -= operation_cdma_samba; + imapGif.switch += torrent; + } else { + pmu.disk_captcha = digital_ppp_pci + recursionTransistor(5, dram); + ajax_service += grayscalePythonLock; + google_scroll_capacity = ftp + engine_dslam_sidebar / tape - 1; + } + drive_rw = zipTftp; + var suffix = software_router_extension.dimm_ddr(-5, + kernel_digital_minisite); + +Vocavit toto; alas **mitis** maestus in liquidarum ab legi finitimosque dominam +tibi subitus; Orionis vertitur nota. Currere alti etiam seroque cernitis +innumeris miraturus amplectique collo sustinet quemque! Litora ante turba? diff --git a/exampleSite/content/_index.cn.md b/exampleSite/content/_index.cn.md deleted file mode 100644 index 3e99823..0000000 --- a/exampleSite/content/_index.cn.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: 介绍 -type: docs ---- - -# 中文索引页 - -{{< columns >}} -## Astris ipse furtiva - -Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut -olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis, -modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies - -<---> - -## Suis quot vota - -Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat: -miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod -nunc! Fragosis suae dextra geruntur functus vulgata. -{{< /columns >}} - - -## Tempora nisi nunc - -Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei, -tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis -sequens! - - var panel = ram_design; - if (backup + system) { - file.readPoint = network_native; - sidebar_engine_device(cell_tftp_raster, - dual_login_paper.adf_vci.application_reader_design( - graphicsNvramCdma, lpi_footer_snmp, integer_model)); - } - public_keyboard_docking += error.controller_gibibyte_plug.ip(4, - asciiPetaflops, software(supercomputer_compatible_status + 4)); - dynamic_disk.indexModeLaptop = bufferTftpReality; - var export_vlog_sequence = trinitron_flowchart + supercomputer_cluster_rj( - -1, toolbar_powerpoint_query, -2 / multiprocessing_impression); - -## Locis suis novi cum suoque decidit eadem - -Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? Venit spes -versus finis sermonibus patefecit murum nec est sine oculis. _Ille_ inmota -macies domoque caelestia cadit tantummodo scelus procul, corde! - -1. Dolentem capi parte rostro alvum habentem pudor -2. Fulgentia sanguine paret -3. E punior consurgit lentus -4. Vox hasta eras micantes - -## Facibus pharetrae indetonsusque indulsit sic incurrite foliis - -Nefandam et prisci palmas! Blandita cutis flectitur montis macies, te _nati_ -Latiis; turbaque inferias. Virginis tibi peracta avidusque facies caper nec, e -at ademptae, mira. - - direct *= font(inputScareware(sliHome), crossplatform.byte( - ppl_encryption.excel_e_rte(integratedModelModifier), timeVirtual, - floating_speakers.media_printer(us, yahoo, primaryPhp))); - friendly_metal_flatbed(cd, isoPrimaryStorage(reader), dmaMirrored); - if (parse_flash_cron.metalGif(1, adServiceDevice, utility)) { - adf -= operation_cdma_samba; - imapGif.switch += torrent; - } else { - pmu.disk_captcha = digital_ppp_pci + recursionTransistor(5, dram); - ajax_service += grayscalePythonLock; - google_scroll_capacity = ftp + engine_dslam_sidebar / tape - 1; - } - drive_rw = zipTftp; - var suffix = software_router_extension.dimm_ddr(-5, - kernel_digital_minisite); - -Vocavit toto; alas **mitis** maestus in liquidarum ab legi finitimosque dominam -tibi subitus; Orionis vertitur nota. Currere alti etiam seroque cernitis -innumeris miraturus amplectique collo sustinet quemque! Litora ante turba? diff --git a/exampleSite/content/_index.ru.md b/exampleSite/content/_index.ru.md deleted file mode 100644 index 8fa610a..0000000 --- a/exampleSite/content/_index.ru.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Введение -type: docs ---- - -# Стартовая страница на русском языке - -{{< columns >}} -## Astris ipse furtiva - -Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut -olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis, -modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies - -<---> - -## Suis quot vota - -Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat: -miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod -nunc! Fragosis suae dextra geruntur functus vulgata. -{{< /columns >}} - - -## Tempora nisi nunc - -Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei, -tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis -sequens! - - var panel = ram_design; - if (backup + system) { - file.readPoint = network_native; - sidebar_engine_device(cell_tftp_raster, - dual_login_paper.adf_vci.application_reader_design( - graphicsNvramCdma, lpi_footer_snmp, integer_model)); - } - public_keyboard_docking += error.controller_gibibyte_plug.ip(4, - asciiPetaflops, software(supercomputer_compatible_status + 4)); - dynamic_disk.indexModeLaptop = bufferTftpReality; - var export_vlog_sequence = trinitron_flowchart + supercomputer_cluster_rj( - -1, toolbar_powerpoint_query, -2 / multiprocessing_impression); - -## Locis suis novi cum suoque decidit eadem - -Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? Venit spes -versus finis sermonibus patefecit murum nec est sine oculis. _Ille_ inmota -macies domoque caelestia cadit tantummodo scelus procul, corde! - -1. Dolentem capi parte rostro alvum habentem pudor -2. Fulgentia sanguine paret -3. E punior consurgit lentus -4. Vox hasta eras micantes - -## Facibus pharetrae indetonsusque indulsit sic incurrite foliis - -Nefandam et prisci palmas! Blandita cutis flectitur montis macies, te _nati_ -Latiis; turbaque inferias. Virginis tibi peracta avidusque facies caper nec, e -at ademptae, mira. - - direct *= font(inputScareware(sliHome), crossplatform.byte( - ppl_encryption.excel_e_rte(integratedModelModifier), timeVirtual, - floating_speakers.media_printer(us, yahoo, primaryPhp))); - friendly_metal_flatbed(cd, isoPrimaryStorage(reader), dmaMirrored); - if (parse_flash_cron.metalGif(1, adServiceDevice, utility)) { - adf -= operation_cdma_samba; - imapGif.switch += torrent; - } else { - pmu.disk_captcha = digital_ppp_pci + recursionTransistor(5, dram); - ajax_service += grayscalePythonLock; - google_scroll_capacity = ftp + engine_dslam_sidebar / tape - 1; - } - drive_rw = zipTftp; - var suffix = software_router_extension.dimm_ddr(-5, - kernel_digital_minisite); - -Vocavit toto; alas **mitis** maestus in liquidarum ab legi finitimosque dominam -tibi subitus; Orionis vertitur nota. Currere alti etiam seroque cernitis -innumeris miraturus amplectique collo sustinet quemque! Litora ante turba? -- cgit v1.2.3