Feature #14996

Show creation date for blog posts when accessed directly

Added by Unispezi 2017-11-22 09:50:46 . Updated 2018-10-01 13:29:40 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Target version:
Start date:
2017-11-22
Due date:
% Done:

90%

Feature Branch:
web/14996-blog-post-dates
Type of work:
Wait
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

Currently the creation date for blog posts is shown in the blog posts list, but not when reading the post. If you came to the blog post via Google etc. there’s no easy way to find out how old the post is.

For security related information, knowing how old it is is important and should be easily accssible.


Files

inline.png (32087 B) sajolida, 2018-04-07 12:09:34
date.png (31981 B) sajolida, 2018-09-18 03:14:04

Subtasks


Related issues

Related to Tails - Bug #15839: ikiwiki po switches language environment for building pages Confirmed 2018-08-25
Blocks Tails - Feature #15392: Core work 2018Q2 → 2018Q3: User experience Resolved 2018-03-09

History

#1 Updated by mercedes508 2017-11-25 17:59:54

  • Status changed from New to Confirmed
  • Assignee set to sajolida
  • Priority changed from Normal to Low

Sajolida, can you take care of this? Sounds quite simple. Dropping priority as it’s still possible to get the blog post date easily.

#2 Updated by Anonymous 2018-01-18 17:30:16

  • Subject changed from Show creation date for blog posts when reading to Show creation date for blog posts when accessed directly

#3 Updated by sajolida 2018-02-01 18:30:18

  • Assignee changed from sajolida to intrigeri
  • QA Check set to Info Needed

I also thought about that today… Unfortunately, since there is no semantic difference in ikiwiki between blogs posts and others pages on our website, it won’t be simple.

Maybe an option could be to use the [pagetemplate]( https://ikiwiki.info/ikiwiki/directive/pagetemplate/) to use a different template on all the blog posts.

intrigeri: Do you think it would work and be worth it?

#4 Updated by intrigeri 2018-02-02 14:09:57

  • Assignee changed from intrigeri to sajolida
  • QA Check changed from Info Needed to Dev Needed

> Maybe an option could be to use the [pagetemplate]( https://ikiwiki.info/ikiwiki/directive/pagetemplate/) to use a different template on all the blog posts.

> intrigeri: Do you think it would work

I guess it should work, yes (modulo the usual “we can’t localize stuff in templates”).

> and be worth it?

No idea how severe this UX problem is.

#5 Updated by sajolida 2018-04-07 12:02:21

  • blocks Feature #15392: Core work 2018Q2 → 2018Q3: User experience added

#6 Updated by sajolida 2018-04-07 12:14:30

  • File inline.png added
  • Priority changed from Low to Normal
  • Feature Branch set to web/14996-blog-post-dates

I could get a proof-of-concept working very quickly, see web/14996-blog-post-dates.

Showing the date of blog posts is a super common good practice that makes perfect sense but that we are not following. Seeing that this is actually easy to fix, let’s do it even if we’re not sure about how severe this really is.

While working on this I would also like to move the date of blog post from the bottom to the top of the inlined section when they are listed on /news. See attachment.

Regarding localization, dates are not localized even when using the default format so it’s not so much about not having localization mechanisms in templates but rather about the PO plugin not localizing dates whatsoever. We already use ISO 8601 in the “Install Tails” button so let’s do that for blog posts as well.

Also, knowing how we write blog posts, only days are relevant so I propose to use ‘%Y%m%d’ only.

#7 Updated by intrigeri 2018-06-18 05:51:45

FWIW https://0xacab.org/Hefee/tails/tree/bugfix/15461-translate-unsafe-browser-homepage introduces usage of pagetemplate. I expect it to be merged in 3.8 and then it’ll give a real-world example of what we can (or can’t) do with this tool :)

#8 Updated by sajolida 2018-08-03 11:50:19

  • Assignee changed from sajolida to hefee
  • QA Check changed from Dev Needed to Ready for QA

Here is a branch.

hefee: as you were the one to work on Bug #15461, would you be interested in reviewing this one?

Please report the time spent as I’ll pay you from my UX budget.

#9 Updated by hefee 2018-08-06 08:42:16

You surly forgot to add news.tmpl to the tails repository (./wiki/src/templates/news.tmpl). The other changes look fine.

> prettydate

To use ‘%Y%m%d’ sounds like a valid workaround. The proper solution should use %x (“the locale’s appropriate date representation”) and set the language correctly within po plugin so the %x returns the correct date representation for the language. Or make it possible to set the dateformat string for each language by hand.

( I needed 0.5h to look into the issue)

#10 Updated by intrigeri 2018-08-06 13:44:04

  • Assignee changed from hefee to sajolida
  • QA Check changed from Ready for QA to Dev Needed

#11 Updated by sajolida 2018-08-06 14:50:23

  • Status changed from Confirmed to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:0038994db9a3e408c8a0ea7318918ca95d5d61f1.

#12 Updated by intrigeri 2018-08-07 08:29:23

  • Status changed from Resolved to In Progress

(Another buggy “Closes” that confuses Redmine.)

#13 Updated by sajolida 2018-08-11 08:40:37

  • Assignee changed from sajolida to hefee
  • QA Check changed from Dev Needed to Ready for QA

Hmm… I’m not sure what happened to me on this day :)

Reassigning to hefee (tentatively).

#14 Updated by hefee 2018-08-11 22:08:42

  • Assignee changed from hefee to sajolida
  • % Done changed from 100 to 90
  • QA Check changed from Ready for QA to Info Needed

I do not seen any updates of your branch, so what I should do reviewing at?
web/14996-blog-post-dates has this last commit: 8456e06bbfb6166cf899a7707a135bdaa40479ae

#15 Updated by sajolida 2018-08-13 15:24:26

  • Assignee changed from sajolida to hefee
  • QA Check changed from Info Needed to Ready for QA

Oops, sorry! With the buggy Redmine messages I missed your review from last week!

> You surly forgot to add news.tmpl to the tails repository (./wiki/src/templates/news.tmpl).

I added it in a487f36790.

> The other changes look fine.

Good!

> The proper solution should use %x (“the locale’s appropriate date representation”) and set the language correctly within po plugin so the %x returns the correct date representation for the language. Or make it possible to set the dateformat string for each language by hand.

I didn’t know about ‘%x’ and tested it. On my machine it uses “MM/DD/YY” for all languages. I understand this is because it’s not integrated in the po plugin.

So yeah, for now I’ll stick to YYYY-MM-DD, aka. ISO 8601, as praised by XKCD: https://xkcd.com/1179/

Can you have a look at news.tmpl?

> ( I needed 0.5h to look into the issue)

Please update this number after reviewing news.tmpl…

#16 Updated by sajolida 2018-08-13 15:24:41

  • Target version set to Tails_3.9

#17 Updated by hefee 2018-08-25 09:51:51

  • related to Bug #15839: ikiwiki po switches language environment for building pages added

#18 Updated by hefee 2018-08-25 09:54:13

  • QA Check changed from Ready for QA to Pass

Looks fine for me.

(I spent 0.75h to look into the issue in total.)

#19 Updated by intrigeri 2018-09-01 14:02:03

  • Assignee changed from hefee to sajolida

Note that the branch currently FTBFS. It would be nice to merge master into it and make sure the build works before merging into master.

#20 Updated by intrigeri 2018-09-05 16:27:00

  • Target version changed from Tails_3.9 to Tails_3.10.1

#21 Updated by sajolida 2018-09-10 17:56:54

  • Type of work changed from Website to Wait

I asked root@boum.org to enable the prettydate plugin on our website.

#22 Updated by sajolida 2018-09-18 03:14:06

  • File date.png added
  • Status changed from In Progress to Resolved
  • Assignee deleted (sajolida)
  • QA Check deleted (Pass)

Merged and it works!

#23 Updated by intrigeri 2018-10-01 13:29:40

  • Target version changed from Tails_3.10.1 to Tails_3.9.1