LibKa

v2.0.4
io.github.aivigator-ai/libka Checked 7 hours ago Published 14 days ago

One LibKa Markdown file to web pages, PDFs, slides and Word files, each checked and signed.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

libka_list_blocks List LibKa blocks

Every LibKa block with the content it fits ("use when"), grouped; plus content that has no block, and what to write for it instead.

ParameterTypeDescription
groupstringOnly this group: text, how-to, explain, highlight, media, data, ui

libka_get_block Get one LibKa block

Full definition of a block: example syntax, attributes, what the web page, PDF, slides and Word file do with it, accessibility rules, anti-patterns and its JSON schema.

ParameterTypeDescription
name *stringBlock name, such as steps, tabs, chart or ui

libka_check Check LibKa Markdown

Parse LibKa Markdown without building: problems with line numbers (fix all of them), the outline, block counts, how many slides the deck will have and the design it is built with. Fast; call it after every change.

ParameterTypeDescription
markdown *stringThe complete LibKa Markdown document, including front matter
pathstringWhere the document is or will be saved (.md), so its brand and theme files (brand:, theme:, the project's _brand.yml) are found and checked too

libka_build Build a LibKa document

Write the LibKa Markdown to a folder and build it: the outputs the document asks for in its front matter (outputs: web, pdf, deck, docx; default web and pdf), or the outputs given here. Guard checks every output (the pages in Chrome, the PDF with veraPDF when Java and veraPDF are installed, the Word file's structure); passing outputs are signed. Returns the files and every Guard finding to fix. Writes files on this machine, and removes this document's own earlier outputs that this build did not make again.

ParameterTypeDescription
markdownstringThe document; or give path instead, not both
namestringFile name without extension when markdown is given (default: document)
outDirstringOutput folder (default: LIBKA_OUT, or ./libka-out)
outputsarrayBuild these instead of the document's own outputs, e.g. ["web", "deck"] to check slide fit quickly
pathstringAn existing .md file to build, only read (images are found next to it)