hugo-prose
hugo-prose copied to clipboard
[QUESTION] Adding "description" to list.html
Hey @yihui, first of all, thanks so much for this theme, I am having a lot of fun and learning a lot making it my own
I am trying to add a description of sorts under "Posts" (as an example):
I see that the Posts or Work pages (from the example page) get rendered from the list.html
template but I have not been able to figure out how parameters like .IsHome
or .Title
get passed down to the renderer. In essence, I would like to have a Posts page and a Work page with a short paragraph within them. When I create an _index.md
in the posts/
folder for example a "card" gets created instead of the plain HTML default output. See below:
default page:
When I add _index.md
:
I'd like to keep the look of the default Posts page
When I create an
_index.md
in theposts/
folder for example a "card" gets created instead of the plain HTML default output.
The content of _index.md
is rendered here:
https://github.com/yihui/hugo-prose/blob/63481f54dd3c4195816fad48438c0f33f7f29169/layouts/_default/list.html#L9-L13
You can use any HTML tags and style them with CSS as you wish.
Thanks for pointing me to those lines, so if I change the article-list
CSS I should be able to change the default behaviour of creating a card?
If I understand correctly, you want the style of the description to be different with cards. Then what you can do is use a different class name for the description and define the CSS for that class as necessary.
Ok understood! Thanks :) I'll keep digging