Index pages with just post headers

10 views
Skip to first unread message

Paul Moore

unread,
Mar 15, 2023, 8:38:22 AM3/15/23
to nikola-discuss
I'd like a much more "minimal" style for my index pages, so that the list of posts is more visible (the default for obscures it with the *content* of the pages). I've tried using teasers, but the need to set an explicit teaser marker, coupled with the fact that the teaser regexp is matched against the rendered content makes it feel really clumsy for my needs.

Rather than fighting the teaser mechanism, I therefore decided to just go with post titles, but I can't find a way to configure Nikola to just display the post title. Do I need to create a new theme for this? I've been avoiding looking at themes, because my design skills suck.

I guess an alternative would be if there's already a theme that has a "clean" look with a titles-only (or titles-plus-automatic-teaser) index, like the Hugo PaperMod theme (I was tempted to switch to Hugo just for this theme, but the Markdown implementation is annoyingly limited). I didn't see one in the gallery - is there anywhere else I could look?

Paul

Roberto Alsina

unread,
Mar 15, 2023, 9:20:38 AM3/15/23
to nikola-...@googlegroups.com
Copy your template's index.tmpl to your site:

nikola theme -c index.tmpl

Edit the new file you got, and look for something like

% for post in posts:

That is the piece of template that iterates over the shown posts and displays information.

Delete stuff :-)

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/2f6c6f61-a154-4abd-bf9a-b7428d1ce43dn%40googlegroups.com.

Paul Moore

unread,
Mar 15, 2023, 9:44:42 AM3/15/23
to nikola-discuss
So basically, this is something I do with a theme? Cool - looks like I just need to get over my fear of HTML/CSS :-) I just did basically what you said, and it works fine - but the result is very ugly. The font is too big because it's intended as a title to the post, not a standalone entry - which is pretty much to be expected.

Thanks for the confirmation, I'll take it from here I guess.
Paul

Roberto Alsina

unread,
Mar 15, 2023, 11:20:54 AM3/15/23
to nikola-...@googlegroups.com
On Wed, Mar 15, 2023 at 10:44 AM Paul Moore <p.f....@gmail.com> wrote:
So basically, this is something I do with a theme? Cool - looks like I just need to get over my fear of HTML/CSS :-) I just did basically what you said, and it works fine - but the result is very ugly. The font is too big because it's intended as a title to the post, not a standalone entry - which is pretty much to be expected.

Yes, it's part of the theme, but if it's the only change you want then it's just a single file you need to change.

And yes, you will need to tweak the HTML in the template to make it look good :-) 

Thanks for the confirmation, I'll take it from here I guess.
Paul

On Wednesday, 15 March 2023 at 13:20:38 UTC Roberto Alsina wrote:
Copy your template's index.tmpl to your site:

nikola theme -c index.tmpl

Edit the new file you got, and look for something like

% for post in posts:

That is the piece of template that iterates over the shown posts and displays information.

Delete stuff :-)

On Wed, Mar 15, 2023 at 9:38 AM Paul Moore <p.f....@gmail.com> wrote:
I'd like a much more "minimal" style for my index pages, so that the list of posts is more visible (the default for obscures it with the *content* of the pages). I've tried using teasers, but the need to set an explicit teaser marker, coupled with the fact that the teaser regexp is matched against the rendered content makes it feel really clumsy for my needs.

Rather than fighting the teaser mechanism, I therefore decided to just go with post titles, but I can't find a way to configure Nikola to just display the post title. Do I need to create a new theme for this? I've been avoiding looking at themes, because my design skills suck.

I guess an alternative would be if there's already a theme that has a "clean" look with a titles-only (or titles-plus-automatic-teaser) index, like the Hugo PaperMod theme (I was tempted to switch to Hugo just for this theme, but the Markdown implementation is annoyingly limited). I didn't see one in the gallery - is there anywhere else I could look?

Paul

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/2f6c6f61-a154-4abd-bf9a-b7428d1ce43dn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages