Repository navigation
Typed entries
A section's entries are typed by its schema on the website: in
useSection('talks'), in the slots of <VitaSection id="talks">, and in
components that vitakit customize --web writes. Formatted text is
{ text, html }, a link { label, url? }, a group its own fields, so
entry.thesis.supervisor.url needs neither checks nor casts, and a typo such as
entry.titel is an error in the editor and in pnpm check. See
types.
vitakit customize --webwrites components typed for their section:
id: 'teaching', withentriesfor teaching entries a page selected itself.
--useadds the section to the component'sid
(id: 'talks' | 'talks-public'). A group of fields gets one line per part
instead of a comment.vitakit migratetypes the componentscustomizewrote for 0.3, for the
sections they are shown with; casts of your own keep working, and it says
where they are no longer needed.extendSectionkeeps the types of the section it extends; before, every
field of an extended schema wasunknown.- New types:
SectionEntry<typeof schema>,SectionEntries<'talks'>.
What may need changing: code that reads a field the schema does not have
now fails pnpm check, where it showed nothing before. That is the point; the
error names the field.
Updating from 0.3
pnpm add @anja.codes/vitakit@latest
pnpm vitakit migrate --dry-run # see what would change
pnpm vitakit migrate # make the changes
pnpm checkStep by step: Updating vitakit.
Fixes
vitakit migratepoints out a stylesheet that styles the groups of a
publication list but not its title (.vita-publications__title, new in 0.3),
with the rules to add. It does not change the stylesheet.vitakit verifycompares the names of files and pages exactly, including
their case. On macOS and Windows, a link to/img/photo.jpgpassed when the
file waspublic/img/Photo.jpg, and then led nowhere on a case-sensitive web
server or in CI on Linux. Such a link now fails, naming the file as it is.- Docs: those rules for projects updated
from 0.2, the class in the website's styling, and
the size of a list's group headings in
the PDF.