Add a dynamic copyright notice to a Squarespace site

After being annoyed at having to go update the footers on the websites I manage after the new year, I thought it prudent to research and find a solution that would 1) do it for me going forward and 2) work with Squarespace.

It turned out to be pretty simple. This works in a Code block on Squarespace, but it should work with just about any CMS or website builder that allows you to insert a code block/element/widget.

For my Squarespace sites, I've only ever put copyright notices in the footer. Here's how to do that:

  1. Open up your page editor and go to the footer

  2. Add a Code (or Markdown) block above your current Text block copyright notice.

  3. Paste the code below into it and edit it to suit your site's needs.

  4. Save the changes and preview it on the "live" version of your site (not in the editor) so the script doesn't get blocked.

  5. Go back into the editor and tweak as needed; rinse and repeat. When everything looks good, delete the old Text block copyright notice.

  6. Rejoice.

<script type="text/javascript">
    var date=new Date(),
        year = date.getFullYear(),
            text = "Copyright &copy; 2016-" + year + " INSERT COMPANY NAME. All rights reserved.",
        html = '<p style="text-align: center;">' + text + '</p>';

    document.write(html);
 </script>

May 2020 Update

Over time I've modified this to make it a little better and more user friendly. My new version is:

<script type="text/javascript">
    var date = new Date(),
    year = date.getFullYear(),
    open = '<p style="text-align: center; font-size: 75%;">',
    copy = 'Copyright &copy; 2008-' + year + ' Wild Heart Brewing Company. All rights reserved.',
    credit = ' Site by <a href="https://bearsquared.net" target="_blank">Bear Squared</a>.',
    close = '</p>',
    html = open + copy + credit + close;
    document.write(html);
 </script>


Here are my sources for this. The first and second discuss what details need to be included in a copyright notice and a few other particulars about how to do it correctly. The third is from where I stole the code; it was the best version I could find:

  1. http://www.photoattorney.com/qa-what-year-should-i-use-for-my-copyright-notice/, retrieved 20170213.

  2. https://designshack.net/articles/the-footer-copyright-notice/, retrieved 20170213.

  3. https://answers.squarespace.com/questions/58787/how-to-display-current-year-for-copyright.html, retrieved 20170213.

DISCLAIMER IN CASE THIS IS NECESSARY:
I am not a lawyer and have no legal training. I cannot speak to the accuracy or completeness of the information about copyright and copyright notices in this post or on the external pages linked to from this post. Consult an attorney for real answers to your real questions.