hugo-tranquilpeak-theme icon indicating copy to clipboard operation
hugo-tranquilpeak-theme copied to clipboard

Sticky post for frontpage

Open willwade opened this issue 8 years ago • 4 comments

A while ago I was suggesting a sticky item for a frontpage display for hexo. To be honest it doesn't really work nicely with hexo (https://github.com/LouisBarranqueiro/hexo-theme-tranquilpeak/issues/304) - on closer inspection many of the static site generators are so heavily focused on blogs that doing this kind of thing is a fudge. However it does fit better with Hugo whose design principles are more (focused on this kind of flexibility)(http://gohugo.io/content/using-index-md/). TL;DR: I would like a way of choosing a single post (no "continue reading") as the frontpage matter.

willwade avatar Mar 16 '17 19:03 willwade

Today i have no idea how to achieve that I have to check more on Hugo feature.

Because to be sticky you wanted a way to choose a single single post without continue reading but also to be always on top regardless it's publication date

kakawait avatar Mar 17 '17 08:03 kakawait

~~I'll try and mock something up in my fork.~~

I'm an idiot. Its already doable with a _index.md file in your /content/ dir as noted here

willwade avatar Mar 17 '17 09:03 willwade

Actually not quite. Do this:

  • Add a _index_md file to your content (e.g. /posts/ )
  • Note how now you don't get anything showing on the frontpage using tranquilpeak.

Need a little while to figure this out. My guess, as the docs suggest here is that we haven't got a way of displaying the {{ .Content }}

willwade avatar Mar 17 '17 12:03 willwade

OK - I just remembered I would post to this and I haven't..

I now remember why - I'm being lazy:

https://github.com/openassistive/hugo-tranquilpeak-theme/blob/master/layouts/index.html#L12

(see result at http://openassistive.org)

willwade avatar Apr 03 '17 17:04 willwade