Zero maintenance Copyright © with current year

Minimalist and zero maintenance tip …

Drop this into your footer partial layout and you’ll never have to update the year - thanks to Hugo, the year is always right

Just be sure to have author in your config file

Copyright © {{ dateFormat "2006" now }} {{ .Site.Params.author }}.

Results in …

Copyright © 2020 Your Name

The general rule is that the year to include in a copyright notice is the year of first publication of the work. see https://www.copyrightlaws.com/copyright-symbol-notice-year/

And a quick google shows there are way too many opposing opinions to have one rule.

Quora
StackExchange

Some of it is personal style and choice - on my own site … I have

Copyright © Year I started Blogging - Current Year

1 Like

For constantly evolving websites and blogs that contain works published over several years, the notice may include a range of years (e.g., 2011–2020), starting from the date of the oldest published elements and ending with the date of the newest published elements.

Super pro-tip: use CC0. Timeless.

:sunglasses:

1 Like

Lol … and for my next help tip … I’ll write an article on how to set CC in front matter and have the relevant CC mark appear

because people like choice …

:slight_smile:

1 Like

So what would a statement for Copyright © Start-Current, YOURNAME look like?

Is it possible to even pull in the year of the oldes post? and exclude it if all contents were in the current year? else just {{ dateFormat "2006" now }}

I assume something like…

{{ range last 1 .Site.RegularPages }}
Copyright © {{ .Date | dateFormat "2006" }}-{{ dateFormat "2006" now }}, {{ .Site.Params.author }}
{{ end }}

I’m not really sure if .RegularPages is correct here. But it works on what I tested it on.

Now to figure out a statement for if the oldest year is the current year, they only display one of them. Be a nice snippet for people to use. Kinda sucks being a non-programmer and trying to use a static site/generator and template system. Some things are easy to pickup on, but once you start writing statements it’s basically me in full blown trial and error mode until something works.

I also assume this gets trickier if you can copyrighted content that you have published at later dates. Like a photograph that has filed copyright from 2005, but you didn’t publish it on your site until 2020. Legally speaking.

Hi … I would get the Post PublishDate and combine it with GitInfo .LastMod date

This way you can cover

  1. the date of first copyright and
  2. if there is a major revision date
1 Like