rhugoblogdown

Is there any way to publish posts bilingually in websites made by blogdown and Hugo Apero theme?


I am a new user of Blogdown package and recently started blogging in my personal website. I am using Hugo-Apero theme. I published one English post and there is no problem. But, besides, I want my websites to be bilingual. For example; English and Persian. but unfortunately, I could not find a way to do that in Hugo-Apero theme. I know it is possible for simple hugo themes such as Lithium which is used in Yihui Xies's blog which is blogged in English and Chinese both, but I want that for Hugo Apero. Any comments would really be appreciated.

I tried to do that by some codes in my yaml in my hugo apero theme, but I did not get any answer.


Solution

  • Looking at the source code of Hugo Apero, it looks like it does not support multiple languages out of the box, as strings are hardcoded in English inside the theme templates.

    You would have to:

    1. search all english strings and replace them with i18n markups
    2. configure the different languages in the config file
    3. create pages in the different languages in your content directory
    4. if you want a language switcher in the menu bar, you would have to create it too.

    More information here: https://gohugo.io/content-management/multilingual/