Skip to content

Sidebar widgets

maneesha edited this page Sep 13, 2024 · 1 revision

The theme includes several widgets that can be included in page sidebars. Some are included on all pages. Others can be called in the page's frontmatter.

Included on all pages:

  • toc: Creates table of contents based on H2 elements in the page content. This can be hidden by setting hideToc: true in the page's frontmatter
  • feedback: Creates the "Feedback on this page? Contact us" widget.
  • meta: Creates the "Last edited:" widget based on the file's GH edit history OR from the date hard coded in the file's yaml frontmatter (as lastmod: 2022-12-11T14:45:08+00:00). To use the GH edit history enableGitInfo: true must be set in the project's hugo.yaml file.
  • edit-github: Creates the "Edit this page on GitHub" widget.

Added via page's frontmatter:

  • newsletter: Creates the "Subscribe to our newsletter" button
  • sponsors: Creates the list of sponsors widget. This is not currently used and only has placeholder content.

To add widgets to the page's frontmatter:

---
...
widgets:
- newsletter
---
Clone this wiki locally