8
votes

I am using R blogdown package to create my personal website. I am basing it on the hugo-academic theme (code here)

I would like to add a "working papers" section to the publications. In my discipline Economics we normally have

  • "working papers" (pdf is available)
  • "work in progress" (no pdf yet)
  • "publications"

How can I add that?

Do I need to change the internals of the hugo-academic theme? (I am an R user/programmer with little webdev knowledge)

I posted as github issue: hugo-academic/issues/416

Edit: I would also like to have the "Selected Publications" section disapear. I could not do that even after setting selected = false on all the publications .md files. This was asked in github issue: hugo-academic/issues/417

Edit2: I would also like to add a new "Work in progress" section (hugo-academic/issues/418).

Edit3: @jsb answer bellow does not alter how the papers are grouped by type (working paper, work in progress, peer-reviewd), which is my main concern. But it does add these cathegories to the metadata (and fixes question two).

They way I understand it now, I would have to add new widgets for "Working Papers" and "Work in Progress". I think I could create them by analogy from the existing widgets.

Where in the code are the widgets are defined?

3

3 Answers

3
votes

Answering your first question: I don't think this is possible in the current version of the academic theme. However, what you can do, is to use the publication types that are defined in the config.toml file. In this file, there is a list of publication types that are used to categorize publications. It includes a type called "work in progress". You can also add your own publication types to this list, like so:

  publication_types = [
    'Uncategorized',  # 0
    'Conference proceedings',  # 1
    'Journal',  # 2
    'Work in progress',  # 3
    'Technical report',  # 4
    'Book',  # 5
    'Book chapter',  # 6
    'working paper', # 7
    'peer-reviewed' # 8
  ]

For each publication Markdown file, change the publication types parameter to the wanted type, e.g. publication_types = ["7"] for a working paper. The effect is visible when you click on the "Details" link for a publication listed under "Publications" or "Selected Publications".

Answering your second question: to delete a section, delete the corresponding Markdown file from the "content/home" folder. Alternatively, move the unwanted Markdown file to a new folder, e.g. "_not_used", in the "content" folder.

Update: OP found the answer himself, and I am putting it here for future reference:

I found the solution, all I had to do was duplicate the publications.md file, naming it publications_working_papers.md, publications_book_chapters.md for instance. In each file use widget = "publications" and adjust the publication_type accordingly. And also the weight to determine the order.

1
votes

Not sure if this is still relevant @lucasmation, but for 'Selected Publications' to be turned off, you'd have to go to contents>home>publications_selected.md and set the widget to be false. Hope this helps.

# Selected Publications widget.
# This widget displays publications from `content/publication/` which have
# `selected = true` in their `+++` front matter.
widget = "publications_selected"
active = false
date = 2012-01-01T00:00:00
1
votes

I managed to do this in the current hugo-academic setup by using "featured" widgets. In my case I wanted a section for books, one for journal articles and one for working papers.

In the home folder, I made a copy of featured.md and named it working-papers.md. I then renamed the original featured.md to books.md.

From there, I opened books.md, set weight: to 20, changed the title: to Book and set filters: publication_type: to "5".

Next, I opened the new working-papers.md file, set weight: to 30, changed title: to Working Papers and set filters: publication_type: to "3".

Then I renamed publications.md to articles.md, opened the file, set weight: to 25, title: to Journal Articles and set exclude_featured: to true. This ensures that the books and working papers that I want to include in the "featured" widgets do not also appear in my "Journal Articles" section.

Finally, I set featured: to true in the index.md files for my book and working papers in content\publication to populate the new "Book" and "Working Papers" featured widgets.

This gives me three consecutive sections on my website listing my book, journal articles and working papers.

I initially tried it the way you suggested in your note (copying and renaming the publications.md file). You can still do it like this, but the current setup uses the pages widget for publications.md. So instead of changing the widget type, you have to change page_type: to publication and then set publication_type: to whatever type of publication you want to include on that page. This worked OK but strange things happened when I clicked on the "See All Publications" link at the bottom of my "Journal Articles" section, so I ended up using the featured widgets instead.