Skip to content

PostLicense

The card at the end of a post that says whose it is and how it may be shared: the title and address, then the author, the dates and the licence.

Once, at the end of every post, after the tags. Other pages do without it; the footer carries the site’s own copyright line.

<PostLicense
title={post.data.title}
href={new URL(path, Astro.site).href}
author="RottenTh"
published={{ label: publishedDate, datetime: published }}
license={{ name: "CC BY-NC-SA 4.0", href: "https://creativecommons.org/licenses/by-nc-sa/4.0/" }}
/>

A cream card with 24px padding. The title is a 16px sans title in ink, with the address under it in muted 14px text, broken anywhere to fit. Then a row of facts, each an uppercase micro-label over its value: Author, Published, Updated when given, and License.

Prop Values
updated Adds the Updated fact
published, updated A string, or { label, datetime } for a <time>
lang The post’s language, for the title
newTabNote What screen readers hear after the licence link

The card is an <aside> named “Copyright”, and the facts are a <dl>, so a screen reader reads each label with its value. The licence link has rel="license" and opens a new tab, which it tells screen readers.

PostLicense.astro. The handoff has no copyright card; this one has the Shirone theme’s fields on the system’s card body.

PostNav, Footer.