Skip to content

Changelog

starlight-annotations follows semantic versioning. While it is in 0.x, a minor version (0.2.0 → 0.3.0) may change behavior or options; the notes below say what to update. Patch versions only fix things.

Every version is on npm and has a GitHub release. To hear about new ones, watch the repository and choose Custom → Releases.

0.12.0

Minor Changes

  • 11966d5: Suggested edits. Select a few words and press Suggest edit: write the text as it should read, and why if you like. The note shows the change word by word, removed words in red and new ones in green, with Copy new text to apply it by hand. Its author can change it with Edit. The overview page filters them under Type: Suggested edits, notifications say “suggested an edit” with the new text, and an issue opened from one shows a diff block. In the notes file, the thread has suggestion, and its body may be empty.

0.11.0

Minor Changes

  • d2cc295: The notes panel shows when it is saving: a bar slides under its header, Save shows a spinner, the count on the Notes button turns into one, and the panel’s buttons pause so a change is not sent twice. Screen readers hear “Saving…”. If the notes service cannot be reached, the panel says so instead of staying silent.

Patch Changes

  • d97c27f: Long quotes in issues and in Slack, Teams and email notifications are cut between words, as in the panel, instead of in the middle of one (“STA then hol … nd system leads”).

0.10.0

Minor Changes

  • ba3c36b: With issues: true in the GitHub options (or { repo } for another repository), every open thread has Open issue: the server opens a GitHub issue with the quote, a link back and the whole conversation, labelled with the note’s kind, then resolves the note and links the issue in the panel and on the overview page. The credential needs Issues read/write. onChange receives the new issue action, which Slack and Teams post.

0.9.0

Minor Changes

  • 61b2bef: Notes can have a kind (question, problem, proposal or decision), shown as a label and filtered on the overview page. + Note on this page writes a note about the whole page rather than a passage. In the file, a thread has an optional kind, and a page note has a target without a selector. Slack and Teams titles name the kind (“Ada added a question on …”).

0.8.0

Minor Changes

  • ef37ba4: Notes, replies and edits from others since you last opened a page are marked New, the Notes button counts them, and the overview page has a New filter. Typing @ in a note suggests the people who write notes on the site. Both are remembered in the browser only.

0.7.0

Minor Changes

  • 25427bd: Authors can edit their notes and replies, which then show “edited”. A note whose text is gone from the page can be attached to another passage with Attach to other text. The overview page marks these notes Text changed and filters them. The server has two new actions, edit and anchor, which onChange receives too; the Slack and Teams senders skip them unless asked.

0.6.0

Minor Changes

  • f1ec199: Adds emails: true to the GitHub, GitLab and Gitea auths, to email the author of a note when someone else answers or resolves it. The reader’s email is read at sign-in (user:email on a GitHub OAuth app; the “Email addresses” account permission on a GitHub App) and stored on their notes encrypted with a key derived from the session secret, never in clear in the repository or in API responses. onChange events gain threadAuthor: { login, name, email }.
  • 3121a8f: Adds notifications: createAnnotationsHandler({ ..., onChange }) calls a listener (or a list) after every saved change, with the action (create, reply, resolve, reopen, delete), the page, a link that opens the note, who made the change, the note and its thread, and the logins of the other participants and of @mentions. slackWebhook(url) and teamsWebhook(url) post to a Slack or Microsoft Teams channel, and describeChange(event) gives plain text for email or anything else. A failing listener never fails the save; pass the platform context (handler(request, ctx)) and it runs after the response with waitUntil.

0.5.1

Patch Changes

  • 4ff776c: Adds the overview page for every locale of a multilingual site (/it/annotations/ next to /annotations/), in that locale’s language, and makes the notes panel link to the one in the reader’s language. A sidebar link to /annotations/ no longer leads to a missing page on localized pages, since Starlight adds the locale to it.

0.5.0

Minor Changes

  • 6ee673f: Adds a page listing every note on the site, at /annotations/ (change it with the overview option, or set overview: false to leave it out). Notes are grouped by page and can be filtered by status, author and text; the filters are kept in the address. Each note links to its page with #annotation-<id>, which opens the panel on that note and scrolls to its passage, also for resolved notes. The notes panel links to the overview.

    Storages gain an optional list(), implemented for GitHub, GitLab, Gitea/Forgejo, the disk and the browser, and the handler answers GET {prefix}/api/all.

Patch Changes

  • b1bf95b: Makes the overview page easier to find: the notes panel links to it from its header, next to the title, and from the message shown on a page without notes, instead of at the end of the list.

0.4.0

Minor Changes

  • 2a7a36c: Adds GitHub App support: github({ app: { appId, privateKey } }) instead of token. The server mints installation tokens limited to the notes repository, valid for an hour and renewed before they expire, and the app’s client ID and secret also handle sign-in, so one app replaces the OAuth app and the personal access token. It suits organizations: the app belongs to no one, needs no token approval and does not expire. Commits show the app as committer and the reader as author. token keeps working as before; githubAppToken() is exported for other uses of the same app.

0.3.0

Minor Changes

  • 05c032c: Checks write access again while a session lasts, not only at sign-in. Before saving a note, and when a signed-in reader loads a page, the server asks the provider again whether they may still write (writers), reusing the answer for recheck seconds (default 60). If their access was removed, the save is refused and they are signed out, instead of keeping write access until their 30-day session ends. Set recheck: false to check only at sign-in, as before. Custom auths can implement the same with an optional allowed(user).

0.2.0

Minor Changes

  • ccdae74: Adds GitLab and Gitea/Forgejo storage and sign-in, next to GitHub: gitlab({ host, project, … }) for gitlab.com and self-managed GitLab, and gitea({ host, repo, … }) (also exported as forgejo) for Gitea, Forgejo and Codeberg. Both are experimental: they are tested against simulated APIs. The OAuth flow, session and retry logic are now shared by all providers; GitHub behaves as before.

0.1.2

Patch Changes

  • 8c153d2: writers: 'collaborators' (the default) now accepts only people with write, maintain or admin access to the repository. Read and triage access are refused; on a public repository GitHub reports read access for anyone, so before this fix any GitHub user could sign in and annotate.

0.1.1

Patch Changes

  • 7ebce53: Loads the Markdown parser only when a page has notes or a reader starts writing one. The script added to every page drops from about 100 kB to 27 kB.
  • 943a525: Fixes the annotation UI having no styles in production builds: the stylesheet is now added to Starlight’s customCss, which is linked on every page. In 0.1.0 the Notes button and panel appeared unstyled at the end of the page.
  • 1d6c768: Points the npm homepage to the documentation site, and adds badges, feature icons and more search keywords to the package page.

0.1.0

Minor Changes

  • 859bd1b: First release. Readers select text on a Starlight page and leave Markdown notes with replies; notes are stored as one JSON file per page on an annotations branch of a GitHub repository, through OAuth sign-in and a Web-standard handler, or in the reader’s browser with backend: 'browser'.