Wowchemy-hugo-modules: Organize parents in doc/tutorial/course

Created on 28 Oct 2018  路  4Comments  路  Source: wowchemy/wowchemy-hugo-modules

I'd like to organize the parents of the new docs widget, but I haven't found how to do it on the academic theme documentation. For example, if I have:

+++
title = "Outils math茅matiques"

date = 2018-09-09T00:00:00
# lastmod = 2018-09-09T00:00:00

draft = false  # Is this a draft? true/false
toc = true  # Show table of contents? true/false
type = "docs"  # Do not modify.

# Add menu entry to sidebar.
linktitle = "Outils math茅matiques"
[menu.course]
  parent = "2018 - 2019"
  weight = 1
+++

And

+++
title = "Alg猫bre Lin茅aire"

date = 2018-06-09T00:00:00
# lastmod = 2018-09-09T00:00:00

draft = false  # Is this a draft? true/false
toc = true  # Show table of contents? true/false
type = "docs"  # Do not modify.

# Add menu entry to sidebar.
linktitle = "Alg猫bre Lin茅aire"
[menu.course]
  parent = "2015 - 2018"
  weight = 2
+++

I'd like the parent 2018 - 2019 to appear first on the sidebar and 2015 - 2018 to appear second. However with the current setup 2015 - 2018 appears before 2018 - 2019. Is there a way to organize these parents? (weight is only organizing the children for me).

Thanks!

Most helpful comment

The settings for the Academic docs website are here: https://github.com/sourcethemes/academic-www . There are 2 ways to create parents in Hugo - by defining a page as a parent in the front matter (as in the example website) or by setting all the parent links in config.toml. The docs website does the latter. The Hugo website also documents these options.

All 4 comments

These are child pages, can you link to their parents in your repo?

I'm sorry I didn't understand the question.... I don't have .md files for the parents because creating those for the parents also creates blank pages. I want something that behaves like the academic docs where clicking the parents links you to the first child.

You can find a link to my repo here

The settings for the Academic docs website are here: https://github.com/sourcethemes/academic-www . There are 2 ways to create parents in Hugo - by defining a page as a parent in the front matter (as in the example website) or by setting all the parent links in config.toml. The docs website does the latter. The Hugo website also documents these options.

Oh, I should use the config.tolm method then. Thanks for the link! That was exactly what I needed!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

netw0rkf10w picture netw0rkf10w  路  4Comments

JOduMonT picture JOduMonT  路  4Comments

anirbanbasu picture anirbanbasu  路  3Comments

jacebenson picture jacebenson  路  3Comments

CommonClimate picture CommonClimate  路  4Comments