New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hugo version 0.53 restructures `config.toml` --> exampleSite won't render #359

Closed
apreshill opened this Issue Jan 21, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@apreshill
Copy link
Member

apreshill commented Jan 21, 2019

Hi @yihui,

Someone else alerted me to a refactoring of Hugo exampleSites, as with the hugo-academic theme. I reproduced the issue with Hugo version 0.53 using gcushen/hugo-academic theme.

Here is the author's commit that changed the structure.

And here is the new exampleSite:
https://github.com/gcushen/hugo-academic/tree/master/exampleSite

The most significant change is that multiple .toml files now exist (languages, params, and menus are pulled out separately), instead of one config.toml file.

For reference, here was the old exampleSite config.toml file:
https://github.com/rbind/apreshill/blob/master/themes/hugo-academic/exampleSite/config.toml

Here is the beginning of the OLD main menus:

# Navigation Links
#   To link a homepage widget, specify the URL as a hash `#` followed by the filename of the
#     desired widget in your `content/home/` folder.
#   The weight parameter defines the order that the links will appear in.
[params.menus]
  # Align the main menu to the right of the page? (true/false)
  align_right = true

[[menu.main]]
  name = "Home"
  url = "#about"
  weight = 1

In the new exampleSite menu.toml this same section looks like this:

# Navigation Links
#   To link a homepage widget, specify the URL as a hash `#` followed by the filename of the
#     desired widget in your `content/home/` folder.
#   The weight parameter defines the order that the links will appear in.

[[main]]
  name = "Home"
  url = "#about"
weight = 1

However, no naive quick fixes worked me (I tried created a master config.toml file by pasting the multiples into one and updating the names of the params, I also tried using the old example config file and just pasting that in). Not sure if you have seen this recently with any other themes, but it seemed like a pretty drastic restructuring so wanted to make sure you are aware of it.

@yihui

This comment has been minimized.

Copy link
Member

yihui commented Jan 21, 2019

I just fixed it in new_site(): de0bcf5 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment