snlab-freedom/hugo-theme-cooler

Generalize documentation widget

fno2010 opened this issue · 1 comments

Documentation widget is a singleton which is defined by partials/widgets/documentation.html, partials/sidebar.html and config.toml now.

But actually, we can generalize the documentation widget. It means we can define multiple widget instances and list them in the sidebar.

A potential solution is the following config style:

[[params.widget.linklist]]
    title = "Documentation"
    links = [
        ["Demos", "/demo"],
        ["Tutorials", "/tutorials"]
    ]

[[params.widget.linklist]]
    title = "Wiki"
    links = [
        ["Getting Started", "/wiki/getting_started"],
        ["Code Specification", "/wiki/code_specification"]
    ]