Skip to content

Commit d512269

Browse files
committed
multilingual support
1 parent 8d8ca7a commit d512269

File tree

25 files changed

+156
-5
lines changed

25 files changed

+156
-5
lines changed

config.toml

Lines changed: 156 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ defaultHiddenFromHomePage = false
238238
# Social config about the author
239239
[params.social]
240240
GitHub = "shineyruan"
241-
Linkedin = "zhihaoruan/"
241+
Linkedin = "zhihaoruan"
242242
Twitter = ""
243243
Instagram = ""
244244
Facebook = ""
@@ -311,7 +311,7 @@ HackTheBox = ""
311311
RootMe = ""
312312
Phone = ""
313313
Email = "shineyruan@gmail.com"
314-
RSS = false #
314+
RSS = true #
315315

316316
# Page global config
317317
[params.page]
@@ -644,8 +644,159 @@ isHTML = false
644644
# Options to make hugo output files
645645
[outputs]
646646
#
647-
home = ["HTML", "JSON"]
647+
home = ["HTML", "RSS", "JSON"]
648648
page = ["HTML", "MarkDown"]
649-
section = ["HTML"]
650-
taxonomy = ["HTML"]
649+
section = ["HTML", "RSS"]
650+
taxonomy = ["HTML", "RSS"]
651651
taxonomyTerm = ["HTML"]
652+
653+
# Multilingual
654+
# 多语言
655+
[languages]
656+
[languages.en]
657+
weight = 1
658+
languageCode = "en"
659+
languageName = "English"
660+
hasCJKLanguage = false
661+
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
662+
[languages.en.menu]
663+
[[languages.en.menu.main]]
664+
weight = 1
665+
identifier = "projects"
666+
pre = ""
667+
post = ""
668+
name = "Projects"
669+
url = "/categories/projects/"
670+
title = ""
671+
[[languages.en.menu.main]]
672+
weight = 2
673+
identifier = "my-gallery"
674+
pre = ""
675+
post = ""
676+
name = "My Gallery"
677+
url = "/categories/my-gallery/"
678+
title = ""
679+
[[languages.en.menu.main]]
680+
weight = 3
681+
identifier = "posts"
682+
pre = ""
683+
post = ""
684+
name = "Posts"
685+
url = "/posts/"
686+
title = ""
687+
[[languages.en.menu.main]]
688+
weight = 4
689+
identifier = "tags"
690+
pre = ""
691+
post = ""
692+
name = "Tags"
693+
url = "/tags/"
694+
title = ""
695+
[[languages.en.menu.main]]
696+
weight = 5
697+
identifier = "categories"
698+
pre = ""
699+
post = ""
700+
name = "Categories"
701+
url = "/categories/"
702+
title = ""
703+
[[languages.en.menu.main]]
704+
weight = 6
705+
identifier = "about"
706+
pre = ""
707+
post = ""
708+
name = "About"
709+
url = "/about/"
710+
title = ""
711+
[languages.en.params]
712+
[languages.en.params.search]
713+
enable = true
714+
type = "lunr"
715+
contentLength = 4000
716+
placeholder = ""
717+
maxResultLength = 10
718+
snippetLength = 30
719+
highlightTag = "em"
720+
absoluteURL = false
721+
[languages.en.params.home]
722+
rss = 10
723+
[languages.en.params.home.profile]
724+
enable = true
725+
gravatarEmail = ""
726+
avatarURL = "/images/author/avatar.jpg"
727+
title = "Zhihao (Ryan) Ruan"
728+
subtitle = "What matters in life is not what happens to you but what you remember and how you remember it."
729+
typeit = true
730+
social = true
731+
disclaimer = ""
732+
[languages.en.params.social]
733+
GitHub = "shineyruan"
734+
Linkedin = "zhihaoruan"
735+
Email = "shineyruan@gmail.com"
736+
RSS = true
737+
738+
[languages.zh-cn]
739+
weight = 2
740+
languageCode = "zh-CN"
741+
languageName = "简体中文"
742+
hasCJKLanguage = true
743+
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
744+
[languages.zh-cn.menu]
745+
[[languages.zh-cn.menu.main]]
746+
weight = 1
747+
identifier = "posts"
748+
pre = ""
749+
post = ""
750+
name = "所有文章"
751+
url = "/posts/"
752+
title = ""
753+
[[languages.zh-cn.menu.main]]
754+
weight = 2
755+
identifier = "tags"
756+
pre = ""
757+
post = ""
758+
name = "标签"
759+
url = "/tags/"
760+
title = ""
761+
[[languages.zh-cn.menu.main]]
762+
weight = 3
763+
identifier = "categories"
764+
pre = ""
765+
post = ""
766+
name = "分类"
767+
url = "/categories/"
768+
title = ""
769+
[[languages.zh-cn.menu.main]]
770+
weight = 5
771+
identifier = "about"
772+
pre = ""
773+
post = ""
774+
name = "关于"
775+
url = "/about/"
776+
title = ""
777+
[languages.zh-cn.params]
778+
[languages.zh-cn.params.search]
779+
enable = true
780+
type = "lunr"
781+
contentLength = 4000
782+
placeholder = ""
783+
maxResultLength = 10
784+
snippetLength = 50
785+
highlightTag = "em"
786+
absoluteURL = false
787+
[languages.zh-cn.params.home]
788+
rss = 10
789+
[languages.zh-cn.params.home.profile]
790+
enable = true
791+
gravatarEmail = ""
792+
avatarURL = "/images/author/avatar.jpg"
793+
title = "Zhihao (Ryan) Ruan"
794+
subtitle = "生命中真正重要的不是你遭遇了什么,而是你记住了哪些事,又是如何铭记的。"
795+
typeit = true
796+
social = true
797+
disclaimer = ""
798+
[languages.zh-cn.params.social]
799+
GitHub = "shineyruan"
800+
Linkedin = "zhihaoruan"
801+
Email = "shineyruan@gmail.com"
802+
RSS = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)