Skip to content
Code on GitHub (opens in a new tab)

← All the news

Ehundu 0.15.0

The contract, reviewed before freezing it. 0.15 brings no new features: it is the version in which the whole contract was read against the code, so that what 1.0 is going to promise is true. Decisions 128 to 140 of docs/formato.md (opens in a new tab) come out of it. What the engine did and was only in the code is now written down (the exact rules of shortcodes, what a link to another domain is, the order of texts, the table of letters of the slug filter, what the engine writes in salida/), and what was taken blindly, because it was dangerous or ambiguous, now warns or stops the build. Built with 0.14.0 and with this one, the twenty-three test sites give the same files, one by one, with no new warnings.

What now stops the build (with the file and the line, in the error). A formato that is not an integer greater than zero ("2" in quotes, 0): before it was warned about and taken as 1, and it could pass off a project of another format as good. A url in sitio.yml with a path or with parameters (https://ejemplo.com/sub/): the engine accepted it and left the site half done, and the url is that of the domain, with or without the trailing slash (decisions 130 and 136). A dot in the name of a page, of a datos/ file or of a _datos.yml when what follows the last dot is not shaped like a language code (guia.v2.md, 2024.10.01-titulo.md): before, the file was skipped with a warning and the next deployment deleted the page from the server (decision 135).

What now warns. A date (fecha, publicar) written with a time or a zone warns and only the day is taken, from its midnight in the zone of the site: a date is a day (decision 129). The five fields that the engine always writes in pagina (ruta, contenido, markdown, encabezados and traducciones) warn if the front matter uses them, and the field is ignored, as idioma already was; before, they covered them silently (decision 133). componentes, reserved for some time, warns if a site uses it as a field of its own, although it still reaches the template (decision 138).

What changes in the output. An image linked to another domain carries target="_blank" and rel, like any link written in Markdown: the figure of a single linked image and the imagen shortcode with enlace. The imagen template receives two new variables, externo and rel; an imagen template of the site that does not use them stays as it was written (decision 131). The publico/ folder stops copying what the system and Git leave behind (.DS_Store, .gitkeep, Thumbs.db, desktop.ini and any .git), and contenido/ ignores Thumbs.db and desktop.ini; .htaccess and .well-known/ are still copied (decision 138). None of the test sites changes.

The persisted incremental build, safer. The fingerprint that decides whether the memory in .ehundu/ is good for this engine now looks at the content of the engine's files and the versions of its installed dependencies (and the minor version of PHP), not only at the date of the files: a composer update that changes Twig or CommonMark no longer reuses pages made with the previous version. Each file fingerprint notes when it was taken, so that a file modified while building is not taken as seen. The wait for the lock on .ehundu/ has a limit of one minute, and an enormous time budget in avanzar or in the deployment no longer ends after the first task. Sorting by text calculates the key of each page once, instead of in every comparison. When updating, the first build is a full one (the memory from 0.14 is not valid for this one): it happens once.

What 1.0 promises and what it does not. Batch building (CompiladorPorLotes and its state in .ehundu/lote.json) becomes @internal: what is promised for spreading a build over calls is CompiladorIncrementalEnProceso::avanzar, which returns the same Lote. If you used it, it still works; it is just no longer promised (decision 128). docs/biblioteca.md specifies the named parameters of Desplegador::desplegar and what is inside Pagina::$campos and Lectura::$datos. The contract promises the same HTML with the same version of the engine and its dependencies, and not between versions: what changes when updating will be noted here (decision 137).

For whoever embeds the library. Formato::leer no longer receives the warnings: it throws ErrorDeProyecto if the value is not valid. Informe::$rehechas is always a number (in a full build, that of pages), not null. For a deployment of your own, Configuracion::abrir opens the destination the configuration says, and PlanDeDespliegue::deSalida and PlanDeDespliegue::ficheros trace or read the files in salida/ without repeating the deployment code. And Manifiesto::leer rejects paths that leave the site (.., a leading slash, a drive letter): the manifest lives at the destination, and whoever could write it there must not be able to make Ehundu delete something else. With --todo it is rebuilt.

Documentation. The record of decisions moves to the end of formato.md, as appendix A, so that whoever reads the contract finds the rule before its history (the sections are not renumbered). The schema for editors has its own document, docs/esquema.md (opens in a new tab), which separates what is format from how an editor behaves. The documentation will stay in Spanish, like the format: it is not promised in English. And ehundu --version (or -V) says which version it is.

This version on GitHub (opens in a new tab), with the ehundu.phar.