devtools-docs icon indicating copy to clipboard operation
devtools-docs copied to clipboard

Add date modified to docs

Open paulirish opened this issue 10 years ago • 4 comments

https://twitter.com/cancelBubble/status/502181295095816192 image

I can empathize with this. We should do this.

We could probably even provide a changelog via our git commits if we wanted to go that far.

  • @cancelbubble

paulirish avatar Aug 21 '14 04:08 paulirish

I noticed some pages used to have this. I see 2 logistical things.

  • what level of change justifies updating the date?
  • automating the change (preferred so writers don't need to remember to update it) means even if a spelling fix is pushed the date is updated even though the content could still be outdated.

Maybe at the end of each page we could add a link to the doc page in the master branch. This would:

  • promote the ability for community contributions more.
  • allow people to see the exact revision history of a given document easily.
  • not cause extra work on people maintaining the docs.

Garbee avatar Aug 21 '14 06:08 Garbee

+1

pearlchen-old avatar Aug 21 '14 15:08 pearlchen-old

So in today's IRC campfire we discussed this. We are going to attempt two things to help resolve this.

  1. An attempt is going to be made at automating a timestamp upon commits. So each commit would automatically update this no matter how small.
  2. Regardless of the success of point 1, we are going to link to the history for each page somewhere.
    • Most likely in a footer or something towards the bottom of the documents. I'll take a look at this during an audit and see what makes sense to me. If someone has a preference though let me know because I do enjoy less thinking.

Oh, some mockup text (if both points can be hit) is:

This article was last updated on <time>Date</time>. For a full history of the page please view the changelog.

Garbee avatar Aug 25 '14 20:08 Garbee

So looking over the Github API, there isn't a direct way to get the last edit time for a specific file in the repo (not surprising considering how git works.) So if it were to be done we'd need to hack it manually into the docserver code. To keep things simple, we are probably better off just adding static links to the page changelogs on each and be done.

Sound good?

Garbee avatar Sep 09 '14 15:09 Garbee