Docs / Import and export
Writing and updating a course with an AI
Choosing the right path
- Writing a page or a small addition: write the Markdown of the page (see the page format) and paste it into the editor.
- Writing or rewriting a whole course, or having it reviewed: export the course as a single file (“with references” if the resources stay in the same account, “with resources” for another account), work on it in a chat or text editor, then use Update from a file (existing course) or Import (new course).
- Backup or very large course: use the ZIP archive.
An AI cannot upload a file by itself: you export, paste the content, get the edited file back and import it. Ask the AI to return the complete file, never “the rest is unchanged”.
Checklist for a re-importable file
- Keep the first line, the separators and every
id,baseHash,courseIdandsourceIdfield. A new page or module has noid. - Links between pages use the key:
[[page:my-key]]; keys are unique. - Resource tags keep the existing
id(orres:<key>in resources mode). Never invent the id of a game, repertoire or suite. - One tag per line;
::youtube{...}alone on its line. - Moves in English SAN. Every FEN and every
::diagramline must be checked: see FEN formats and validation. plybetween 0 and the number of half-moves ofmoves; no variations or NAGs insidemoves.- Page source up to 1 MB (each language version up to 256 KB once compiled); at most 50 modules and 500 pages.
- No line that looks like
<!-- lilychess:... -->inside page text. - Give every diagram and resource an explicit
idandlabel.
When an import or update fails
- Read the report: each message gives a code, a line number (single file) or file name (ZIP), and the block concerned. Fix that precise point without rewriting the rest.
FRONTMATTER_INVALIDwith “put it in quotes”: quote the value.DUPLICATE_ID: a page was copied with itsid; removeidandbaseHashfrom the copy.COURSE_MISMATCH: the file comes from another course; export again from the right course, or explicitly accept treating everything as new.- Conflict on a page: it was edited online since the export; choose between overwriting and skipping.
INSUFFICIENT_CREDITS: check the quote and decide.
Remember
- An import creates a private course with draft pages; an update only writes drafts. Republish the affected pages so participants see the changes.
- Resources recreated by an import are private; share them if the course is meant for other people.
- A backup is made before every update and can be downloaded for 24 hours.
Reference: single-file format, formats, modes and errors, updating a course.