diff --git a/config.toml b/config.toml index acf3632..deae0c9 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,6 @@ baseURL = "https://log101.github.io" -languageCode = "en-us" -defaultContentLanguage = "en" +languageCode = "tr" +defaultContentLanguage = "tr" title = "log101" theme = "hermit" # enableGitInfo = true @@ -10,6 +10,23 @@ pygmentsUseClasses = true rssLimit = 10 # Maximum number of items in the RSS feed. enableEmoji = true # Shorthand emojis in content files - https://gohugo.io/functions/emojify/ +[languages] + [languages.tr] + disabled = false + languageCode = 'tr' + languageDirection = 'ltr' + languageName = 'Turkish' + title = 'Log101' + weight = 10 + + [languages.en] + disabled = false + languageCode = 'en-US' + languageDirection = 'ltr' + languageName = 'English' + title = 'Log101' + weight = 20 + [author] name = "Furkan Erdem" @@ -51,26 +68,35 @@ enableEmoji = true # Shorthand emojis in content files - https://gohugo.io/func [menu] [[menu.main]] - name = "Posts" + identifier = 'posts' + name = "Yazılar" url = "posts/" weight = 10 [[menu.main]] - name = "Github" - url = "about-hugo/" + identifier = 'projects' + name = "Projeler" + url = "about/" weight = 20 [[menu.main]] - name = "CV" - url = "about-hugo/" + name = "Github" + url = "about/" weight = 30 [[menu.main]] - name = "Stories" - url = "about-hugo/" + name = "CV" + url = "about/" weight = 40 [[menu.main]] - name = "Running" - url = "about-hugo/" + identifier = 'stories' + name = "Hikayeler" + url = "about/" weight = 50 + + [[menu.main]] + identifier = 'running' + name = "Koşu" + url = "about/" + weight = 60 diff --git a/content/about.en.md b/content/about.en.md new file mode 100644 index 0000000..e9bfc47 --- /dev/null +++ b/content/about.en.md @@ -0,0 +1 @@ +About me diff --git a/content/about.tr.md b/content/about.tr.md new file mode 100644 index 0000000..8bb5267 --- /dev/null +++ b/content/about.tr.md @@ -0,0 +1 @@ +Hakkımda diff --git a/i18n/en.yaml b/i18n/en.yaml new file mode 100644 index 0000000..7268666 --- /dev/null +++ b/i18n/en.yaml @@ -0,0 +1,10 @@ +- id: about + translation: "About" +- id: posts + translation: "Posts" +- id: projects + translation: "Projects" +- id: stories + translation: "Stories" +- id: running + translation: "Running" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 7f09c90..270f67f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -21,6 +21,11 @@ {{- range .Site.Params.customCSS }} {{- end }} + {{ if .IsTranslated }} + {{ range .Translations }} + + {{ end }} + {{ end }} {{- if templates.Exists "partials/extra-head.html" -}} {{ partial "extra-head.html" . }} {{- end }} diff --git a/layouts/index.html b/layouts/index.html index afd16ba..6683f43 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -21,6 +21,13 @@