Repository navigation
Releases: anja-codes/vitakit
Release list
vitakit 0.4.0
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.
vitakit 0.3.0
Publication lists
Which publications are shown, in what order and in which groups is now
declared once per list in content/publication-lists.yml. A page or a PDF
only says where a list goes and under which heading, so the same list shows
the same publications on the website and in the PDF:
# content/publication-lists.yml
recent:
limit: 3<VitaPublications list="recent" title="Recent publications" />\vitapublications[Recent publications]{recent}- Select with
where(any BibTeX field;keywordsmatches one of an
entry's keywords),keys(exactly these, in this order),since/until
andlimit. - Sort by date (default), year, title, source or any field.
- Group by status, year or any field; entries without it go under
otherLabel("Other"). vitakit status,vitakit explain publicationsand
vitakit explain publication-list <name>say what each list selects, what
each setting removed, the citation keys left, and where it is shown. A
misspelt status, field or citation key is an error naming the list.- New projects declare
all(grouped by status, on/publications/and in
the PDF) andrecent(the three newest, on the home page).
New commands
vitakit add publication-list <name> |
declares a list and shows it on a page or in a PDF, asking what it should select if no options are given; checked against publications.bib before anything is written |
vitakit migrate |
updates a project written for an earlier vitakit, showing every change and asking before writing; --dry-run only shows; safe to run again |
Updating from 0.2
pnpm add @anja.codes/vitakit@latest
pnpm vitakit migrate --dry-run # see what would change
pnpm vitakit migrate # make the changes
pnpm vitakit validateStep by step, with what may look different afterwards:
Updating vitakit.
Breaking changes
vitakit migrate converts all of these, except where noted:
<VitaPublications>takeslistandtitleonly.groups,
headings,where,limit, … on the page fail the build; declare a list
instead.\vitainput{publications}is replaced by
\vitapublications[Heading]{list}, andpublications.groupsin a
document's.ymlby a list.schemas/publications.ts:groups/defaultGroupare now
statuses/defaultStatus.usePublications()is replaced byusePublicationList('<list>').
migratepoints to each use, but you change it by hand.- Copies of
VitaPublications.vueorpublications.etamade with
vitakit eject/customizeneed updating by hand;migratelists them. - PDF order: publications in a PDF now follow the list's order, as on the
website: newest first, then the order inpublications.bib. Before, biblatex
sorted them by year and then author. Each group is numbered from 1. vitakit explaintakes the kind first when a name is shared, asadd
does:explain section talks,explain document cv,
explain publication-list recent,explain page cv.--sectionand
--documentare gone. A name alone still works while it is unique.
Fixes
- A syntax error in a project's TypeScript file (e.g.
schemas/*.ts) names
the line, shows the code with a caret, and hints at a missing comma. - A
schemas/publications.tsthat does not load is reported as such, without
follow-up errors about statuses. - The diff of a planned edit shows each change with its own context, instead
of one block from the first changed line to the last. - Help text that starts with an example keeps its indentation.
create-vitakit: the SSH/rsync deployment preset uses GitHub Actions
(.github/workflows/rsync.yml) instead of Forgejo Actions.
Docs
Publications have their own place throughout: a feature on the home page, a
section in the concepts, a "Publications and lists" page, and tutorial
chapter 4 rewritten around lists. "Updating vitakit" walks through updating.
The tutorial's customization chapter and the explanations of schemas and file
paths were made easier to read (#16).
vitakit 0.2.0
The vitakit command
One command answers questions about a project and makes the common changes,
showing every change before it is made:
vitakit status |
every section, where it appears on the website and in the PDF, what is wrong |
vitakit explain <section|document|/route/> |
where it comes from and where it goes; --field prints lines that show a field |
vitakit validate |
everything a build checks, without building or LaTeX |
vitakit add section <name> |
the file, a schema drafted from its entries, one line on a page and in a PDF |
vitakit add field <section> <name> |
one more field a section accepts |
vitakit add page <name> |
a page that can show sections, in the menu |
vitakit customize <section> |
a component, a PDF template or a schema of your own |
vitakit pdf |
build the PDFs (concise output; TeX's own error on failure) |
vitakit verify |
check the generated website |
vitakit eject <file> |
take over a shared component, the citation style or the LaTeX class |
Breaking changes
- Scripts.
build:cvis nowpdf,check:staticis gone. In an existing
project'spackage.json:(npm:"pdf": "vitakit pdf", "check": "pnpm typecheck && pnpm generate && vitakit verify"
npm run typecheck && npm run generate && vitakit verify.) - Binaries.
vitakit-build-cvandvitakit-checkare removed; use
vitakit pdfandvitakit verify.--no-pdfis--tex-only. - Commands.
vitakit add <name>isvitakit add section <name>;
vitakit listisvitakit eject --list; ejecting a schema is
vitakit customize <section> --schema --copy(publications:
vitakit customize publications); ejecting a template is
vitakit customize <section> --pdf. linkedreplacesinstitutionandlink. Every "name that may link"
is{ label, url? }. YAML may still write{ name, url }; code reading
.name(e.g.profile.affiliation.namein a page) must read.label.
Schemas importinginstitutionorlinkimportlinked(and
requiredLinkfor links that need a URL). The context-line part kind is
'linked',INSTITUTION_FIELDSisLINKED_FIELDS.
New
VitaSectiontakeswhere(likewherein a PDF document's.yml) and
title(heading and anchor, hidden without entries). The scaffold's
cv.vueis one<VitaSection id title />line per section, andcv.tex
writes headings inline,\vitasection[Heading]{id}.wherevalues may be numbers; an entry's ownyearfield wins over the
year of its date.- One broken schema no longer hides the other sections during development.
- The LaTeX class uses T1 font encoding under pdfLaTeX, so „, ł, ő and similar
characters typeset. - Shared helper
asLinkedListfor templates.