Closed jdcarls2 closed 1 year ago
The table of contents and the description, author information etc. in the sidebar is part of risotto's single page template. But _index.md
uses the list template, not a single page template.
I'm not sure that, in general, it makes sense to add the TOC/author metadata to list pages. Usually they are in themselves a kind of table of contents, and don't have one specific author. @jdcarls2 What's your intention in using /projects/some-project/_index.md
instead of /projects/some-project.md
? They should result in the same rendered URL.
However I can see that it would be nice to set a description for these pages.
Although a bit off-topic, I think you should also add page description to single page template instead of a site level description?
Maybe something like this, I'm not sure whether the page description would just override the site one.
<!-- Site level -->
{{ with .Site.Params.about }}<meta name="description" content="{{ .description }}">{{ end }}
<!-- Page level -->
<meta name="description" content="{{ .Params.description }}">
@joeroe Honestly, it was my first time using any kind of static site generator, let alone a Hugo theme. The TOC / Author stuff was just me not totally understanding the intended organization of the site, and it makes total sense to me that an _index.md
page would act as the TOC for its directory. But the description is a good add.
With a page like
/projects/some-project.md
, settingtoc: true
adds a great Table of Contents in the sidebar. I love this.But when I have a page like
/projects/some-project/_index.md
, the TOC does not render, even when set totrue
.Edit to add: Page descriptions do not render in
index
pages either.Why would this be?