zerostaticthemes / hugo-winston-theme

A minimal and bold blog theme for Hugo
https://hugo-winston.netlify.app/
MIT License
268 stars 110 forks source link

Remove date from Tags page #25

Closed barry-hennessy closed 1 year ago

barry-hennessy commented 1 year ago

Dates don't make a lot of sense for a tag list page. If a tag can belong to many posts, made on many days, then what does it mean to put, say, October 19th 2022 beside tag foo? Is that the first post, last one? Does it matter?

This simply takes the default list template and replaces the summary with a simplified version. I added the 'dot' because I think it looks nice and breaks the mononoty of an otherwise very bare page.

You could equally take this further and turn it into a full taxonomy page with sub-content etc. etc. This just takes a first step to making it usable.

JugglerX commented 1 year ago

I don't think I've even tested tags on this theme, but I agree dates dont make a whole lot of sense in the tag pages title.

Since this theme has no demo content that includes tags, would you be able to add an example of using tags to the exampleSite content as well?

JugglerX commented 1 year ago

@barry-hennessy would you be able to add demo tag content as well so the tags are testable and functional out of the box. There is actually someone asking for tags functionality in the issues https://github.com/zerostaticthemes/hugo-winston-theme/issues/32

jandusek commented 1 year ago

I've tested this and it works quite nicely, can this be merged?

Sample usage:

Add tags menu to config.toml:

[menu]
  [[menu.main]]
    identifier = 'home'
    name = 'Home'
    url = '/'
    weight = 1
  [[menu.main]]
    name = "Tags"
    identifier = "tags"
    weight = 300
    url = "/tags/"

Add tags to individual posts:

---
title: Sanity is not statistical
date: 2018-12-29
description: 'Once again he glanced at his rival in the opposite cubicle. Something seemed to tell him with certainty that Tillotson was busy on the same job as himself. There was no way of knowing whose version would finally be adopted, but he felt a profound conviction that it would be his own'
image: images/cctv2.jpeg
tags:
    - writing
    - 'short stories'
---

## There was no way of knowing whose version would finally be adopted
...

One thing I've noticed is that the tags are not shown in posts themselves. @barry-hennessy did you get this working somehow?

barry-hennessy commented 1 year ago

@JugglerX I should have some time this week to add a demo page and unblock @jandusek and https://github.com/zerostaticthemes/hugo-winston-theme/issues/32

@jandusek adding tags to the posts themselves should probably solved in another PR. It shouldn't be difficult, but there's also a design question (where to put them, how they should be laid out, if they're right for the design etc.) that's definitely for @JugglerX.

barry-hennessy commented 1 year ago

@JugglerX I've added the example site. This one should be good to go.

JugglerX commented 1 year ago

@barry-hennessy looks great, thanks for the contribution.