Open posts without leaving index / changing URL

Hello,

Is it possible to have posts open and close all on the one index page without, refreshing, leaving the index or changing the URL?

Thanks Felix

What do you mean by open and close all posts on the one index page?

This sounds like a frontend question that should be scriptable with Javascript on the front-end of a website.

Hugo is not a front-end framework. It is a static site generator. Also you can use whatever Javascript you wish in a Hugo website.

That makes sense. I’ll have a deeper look into what I can do with javascript.

Second question, how would I have Hugo create divs (buttons) for each post link in the index?

You can wrap the .Permalink or .RelPermalink to any content page in any sort of markup you need.

Please have a look at the documentation for Hugo templates: