Added
- A site's own components live in
components/, beside its config, each file named for the component it is. An HTML file is drawn as written, with what a page puts inside it where it writes<slot />, and a.tsxor.jsxfile is a Preact component, drawn with Sourcey's own Preact so the site installs none. A file with a built-in's name replaces the built-in.Head,Banner,ContentEndandBodyEndadd to every page, for analytics and the like, andHeaderandFooterreplace the theme's.componentsDirnames another folder, orfalsefor none. - A not-found page marks its root
<html data-sourcey-page="not-found">, so a site's analytics can count missing pages. feedback: trueends each documentation, reference and changelog page by asking "Was this page helpful?" in the page's language. An answer shows its note and dispatches asourcey:feedbackevent,{ value, page }, which the site's own script sends where it keeps feedback; Sourcey sends nothing. A site can name its own title, ratings, values, icons and notes, and frontmatterfeedback: falseleaves it off a page.sourcey migrate mkdocscarries Material's feedback question andhide: [feedback].- Each build reports a link to a path on the site that no page, file or redirect answers, and
brokenLinks: "error"hassourcey buildstop on one before writing anything; the dev server reports them either way. Docusaurus'sonBrokenLinks: "throw", its default, and MkDocs'sstrict: truemigrate to"error". - A
githubnavbar link withstats: trueshows its repository's latest release, stars and forks, read from GitHub when the site builds, withGITHUB_TOKENwhen set. When GitHub does not answer, the build warns and draws the plain link. navigation.breadcrumbs: trueopens each documentation and reference page with the way to it: the site's home, its tab and each section around it, linked where a section has a page of its own.sourcey migrateturns it on where Material'snavigation.pathor Docusaurus's breadcrumbs drew one.lastUpdated: truedates each documentation page and changelog by its file's last commit, beside "Edit this page" in the page's language, and in the sitemap. A shallow checkout stops the build rather than dating every page by its one commit.sourcey migratecarries MkDocs's git revision date plugins, Docusaurus'sshowLastUpdateTimeand Starlight'slastUpdated.- Git graphs (
gitGraph) are drawn, as Mermaid reads and lays them out: a lane for each branch, merges, reverts, highlights, cherry-picks and tags, left to right, top to bottom or bottom to top. Sourcey had shown their source. They come with@sourcey/beautiful-mermaid1.1.6. - Footnotes, written as GitHub writes them (
[^label]and[^label]: note), are numbered in reading order across the page and drawn at its end with a link back. They had shown as text.sourcey migrate mkdocswrites Material's annotations as footnotes. sourcey migrate mkdocscarriessite_author, Material's Google or custom analytics andextra_javascriptinto the site's components, andsourcey migrate docusauruscarriesheadTags,stylesheets,scriptsand Google Analytics. Both had listed them as not carried over.
Changed
- "Edit this page" opens the page's file on GitHub, which anyone can read, with GitHub's editor one click away for whoever can edit. It had opened the editor itself, which sends a visitor who is not signed in, and every crawler, to GitHub's sign-in page. API source links are built the same way.
Fixed
- A page of the site's own (
layout: page) keeps its text to a reading measure, while HTML its author draws keeps the page's width. Its lines had run the window's width. - A diagram's frontmatter
title, such as a pie chart's, is drawn as its title, as Mermaid draws it. It had been left out. - A component written in a sentence draws what it holds as part of the sentence, where a site's component had drawn it as a paragraph inside the sentence.
- A site's component named for a built-in, such as
NoteorCard, is drawn and exported as the site's own wherever it appears. A page's Markdown copy had read it as the built-in it replaced, and stopped the build. - In the dark theme, a diagram's "Diagram source" and the note under a diagram that could not be drawn are lighter, and keep AA contrast on the darkest backgrounds a site sets.
- The Nix flake reads its dependencies from
package-lock.json, so it builds at every commit. It had pinned their hash by hand, which broke whenever a dependency moved.
