ploeh / ploeh.github.com

ploeh blog 'source code'
131 stars 320 forks source link

Make changes easier to detect #538

Open ploeh opened 4 years ago

ploeh commented 4 years ago

A blog post is, in many ways, anchored in time. Sometimes, however, I feel that I need to make changes to a post.

For some time, I've made use of the semantic markup elements del, ins, and so on. Deletions are fairly easy for the reader to detect, because they're decorated with the strikethrough style, but I explicitly removed the underline decoration from inserts because I thought it made the text harder to read.

Since I started to use those semantic markup elements, I've made an effort to include the datetime attribute.

It'd be nice if any semantic element that comes with a datetime element would display a tool tip when you hover over it. Something like added December 18, 2019, 11:27 UTC.

For additions (<ins>), it'd also be nice if there was some none-intrusive hint that this text is a bit different. Perhaps a slightly shaded background colour...

TysonMN commented 4 years ago

I like how StackOverflow and GitHub handle this problem, which is by linking to the revision history of the question/answer/comment with the link text being the time of the most recent edit.

My first thought to achieve this behavior on your blog is to link to the revision history of the file in question. However, that history would include non-content changes from added comments and site-wide changes.

So my next thought is to link to a manually built page where you list only the commits that changed content. This seems reasonable to me.

voroninp commented 3 months ago

Why not the approach similar to ADRs?

Editted post is a new post which automatically overrides the previous one.

20240501_Dutch_is_not_the_language_of_Denmark
20250812_Dutch_is_not_the_language_of_Denmark

Mostly it's going to be a copy paste. Then you can show the difs with something like diff2html or similar frontend js lib.

ploeh commented 3 months ago

Editted post is a new post which automatically overrides the previous one.

How would the new post automatically override the previous one, assuming that they have different permalinks?

voroninp commented 3 months ago

Some js will be needed on the page.

If we opened <DateX>_<FileName> we can list the files, select all files matching the pattern and redirect to the latest one.

If this is much of a hustle, then files should be double linked: prev + next

ploeh commented 3 months ago

This sounds more complicated than using <ins> and <del>. What would be the benefit of this?

voroninp commented 3 months ago

You do it only once (js part).

Then you just copy the whole file, update the date prefix and edit it. For me it's easier than effectively doing diff by hand.

ploeh commented 3 months ago

@voroninp Thank you for taking the time to respond. To be clear, I don't think this is a direction I'd like to go.

I already have <ins> and <del> markup in place. The only thing remaining to be done is a bit of CSS(?) to render the existing metadata in a way such that visibility is improved.