kakawait / hugo-tranquilpeak-theme

A gorgeous responsive theme for Hugo blog framework
https://tranquilpeak.kakawait.com
GNU General Public License v3.0
926 stars 525 forks source link

Sticky post for frontpage #128

Open willwade opened 7 years ago

willwade commented 7 years ago

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.

kakawait commented 7 years ago

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

willwade commented 7 years ago

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 commented 7 years ago

Actually not quite. Do this:

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 commented 7 years ago

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)