
Pamela E. Pairo | An easy and friendly way to build your multilingual website | RStudio
Having a personal website is a great way to share our experiences with other people, that also allows us to improve our communication skills and expand our networking groups. Besides, if the website is multilingual, the scope will be extended considerably by facilitating the exchange of ideas. I will give the key steps, some tips, and important considerations to bear in mind when creating a multilingual website using Blogdown, Hugo, and Netlify. Although having a multilingual website demands more effort, R enables us to build a website easily and keep it updated. I aim to help and encourage others to build their website to promote exchange experiences among people from different native languages. About Pamela: Pamela E. Pairo is a Ph.D. in Biological Sciences of the University of Buenos Aires, with expertise in community ecology. One of her research lines focuses on analyzing the impact of human activities on the diversity and composition of biological communities with particular interest in arthropods. In addition, she is interested in studying the spatio-temporal patterns of dengue disease in Argentina. She also is a teaching assistant in statistics at the Argentine University of Enterprise (UADE)
image: thumbnail.jpg
Transcript#
This transcript was generated automatically and may contain errors.
Hi, I am Pamela Pairo, Ph.D., Biological Sciences from Argentina. In this presentation, I am going to show you how to create a multilingual website using blogdown, Hugo, and Netlify.
Why have a personal website?
First of all, why do you need a personal website? Having a personal website is another way to showcase your CV or resume with styles and gives you the freedom to be creative. By writing posts, you will practice your communication skills, you can exchange knowledge with colleagues, and therefore, your networking will be expanded. In my experience, when I came across with difficulties or doubts, I had able to solve the issues thanks to the posts shared by others.
And finally, the personal website is a platform to connect with the world. For those of us who aren't native English speakers, it is fundamental to have a multilingual website in English to disseminate our work to the global community and in our native language to make our website content more inclusive and accessible for everyone.
For those of us who aren't native English speakers, it is fundamental to have a multilingual website in English to disseminate our work to the global community and in our native language to make our website content more inclusive and accessible for everyone.
Getting started with blogdown and Hugo
Let's get started. We begin creating a new repo in our GitHub account. Then, in RStudio, create a new project with Contribution, Undownload, blogdown, and Hugo. You can look at all the themes and select one on the Hugo website. After that, you will have the default version of the site in the viewer panel, so it's time to customize.
The main files that are part of the website are shown here. In config.tom is where it's located the global settings for the site and in config.default folder are the params.toms where you can change the color theme, the font size of your website, and add your contact details. To change what appears in the navigation menu bar, it's necessary to edit the menu.tom file. And in language.tom is where you can change the language setting.
Making your website multilingual
And how to make your personal website multilingual? I'm going to show you an example of the bilingual website, English and Spanish. In the language.tom, you have to uncomment the lines for a second language to configure your website. Here we have the information about the English part, for example, the language code, where it's located the content, and the title. Note that the abbreviations of the languages are predefined, so if you want a Portuguese website, for example, you need to check which is the correct abbreviation.
Then, in each language, we'll need their own menu.tom file and a subfolder within the content folder. Finally, choose the default language that the visitors will see when visit your page, and for making visible that the website is multilingual, check in params.tom that show is true.
Deploying with Netlify
When you are done with your edits and you are happy with your website, it's time to put it online. One way to do this is using Netlify. One of the advantages of deploying your website through Netlify is that it allows you to have a static site for free and easily. Basically, it connects to the remote repository on GitHub to deploy. Every change that it makes on the website, it will be automatically updated after to push to GitHub.
It's important that the Hugo version that you are running locally match with the version that Netlify is going to use to build your site, and how to do that? Check your local version of Hugo and pick up the Netlify file to your project root directory and specify the Hugo version. Then, go to the Netlify webpage and log in with GitHub to select the repo you've been working with blogdown. You will see something like this but with your information. Go to show advanced and just in case, write the Hugo version, and finally, you will have your website.
In the latest version of blogdown, you can set up the Hugo version by running this code and tell to Netlify the Hugo version with this function.
If you want more information, here are some blogs that I used in this presentation and you can find me on my website and on Twitter. Thank you.
