Add multilanguage support
Enable multilanguage support with two separate (/en and /fr) base directories containing each a sample article
This commit is contained in:
parent
25a0b9d3cc
commit
a03fba7567
3 changed files with 55 additions and 3 deletions
40
config.toml
40
config.toml
|
@ -1,4 +1,40 @@
|
|||
baseURL = "http://example.org/"
|
||||
baseURL = "https://faercol.me"
|
||||
languageCode = "en-us"
|
||||
title = "My New Hugo Site"
|
||||
defaultContentLanguage = "en"
|
||||
defaultContentLanguageInSubdir = true
|
||||
title = "Melora Hugues"
|
||||
theme = "hello-friend-ng"
|
||||
paginate = 10
|
||||
|
||||
[params]
|
||||
dateform = "2 Jan 2006"
|
||||
dateformShort = "2 Jan"
|
||||
dateformNum = "02-01-2006"
|
||||
dateformNumTime = "02-01-2006 15:04"
|
||||
|
||||
homeSubtitle = "Personal website and tech blog"
|
||||
disableReadOtherPosts = false
|
||||
enableSharingButtons = true
|
||||
enableGlobalLanguageMenu = true
|
||||
|
||||
description = "Melora Hugues - Personal website and tech blog"
|
||||
keywords = "blog, tech, dev"
|
||||
images = [""]
|
||||
|
||||
[taxonomies]
|
||||
category = "blog"
|
||||
tags = "tags"
|
||||
series = "series"
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
contentDir = "content/en"
|
||||
|
||||
[languages.fr]
|
||||
contentDir = "content/fr"
|
||||
title = "Mon blog"
|
||||
|
||||
[[menu.main]]
|
||||
identifier = "blog"
|
||||
name = "Blog"
|
||||
url = "/posts"
|
||||
|
|
16
content/fr/posts/premier-post.md
Normal file
16
content/fr/posts/premier-post.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: "Premier Post"
|
||||
date: 2023-06-19T11:37:35+02:00
|
||||
draft: true
|
||||
---
|
||||
|
||||
## Titre
|
||||
|
||||
Ceci est mon contenu
|
||||
|
||||
```python
|
||||
def method(args):
|
||||
print("toto")
|
||||
return args
|
||||
```
|
||||
|
Loading…
Reference in a new issue