Hugo Theme Academic: Rename "interests" in about section

478 Views Asked by At

I'm setting up a Hugo website, theme academic, in R via hugodown. In the "about" section is a column named "interests" which I want to rename into "work".

What I have done so far:

The content/authors/admin/_index.md file contains following code:

interests: # <- I want to rename this into 'work'
- Artificial Intelligence
- Computational Linguistics
- Information Retrieval

If only this file is renamed then the whole column "interests" won't show.

There is another file layouts/partial/widgets/about.html which contains the following code:

  {{ with $person.interests }}
  <div class="col-md-5">
    <h3>{{ i18n "interests" | markdownify }}</h3>
    <ul class="ul-interests">
      {{ range . }}
      <li>{{ . | markdownify | emojify }}</li>
      {{ end }}
    </ul>
  </div>
  {{ end }}

Additional to the above change, naming with $person.interests into with $person.work will show the column again, but it is still called "interests". When additionally changing the i18n "interests" in the <h3> tag into i18n "work" the heading "interests" is removed and only the content of the column is displayed without a heading.

It seems like the new column name "work" has to be registered somewhere else, before it is properly display.

Any help appreciated.

1

There are 1 best solutions below

3
On BEST ANSWER

After fiddling around I found the answer to my question. As I expected there is a file in which all ids and their translation are registred. It depends on the choosen language. If the chosen language is English en then it is enough to go to the folder: themes/academic/i18n/ and open the file en.yaml. Here we find:

# About widget

- id: interests
  translation: Interests

This can be changed to:

- id: interests
  translation: Work

Now the website will properly display "Work" instead of "Interests" on the About widget page.