Diagnostic codes
Each error and warning yuanme reports has a code, such as link/broken. yuanme docs CODE prints its page.
asset
asset/ambiguous-url- A URL names both a project file, which yuanme processes and hashes, and a Static file, which it copies unchanged:
/styles/site.cssis bothstyles/site.cssandstatic/styles/site.css. asset/classic-script- A
<script src>withouttype="module"names a project file. asset/css-in-script- A Script imports a stylesheet.
asset/dependencies-not-installed- A Script or stylesheet imports a package, and the project has a
package.jsonbut nonode_modules. asset/invalid-css- A stylesheet can’t be bundled: it isn’t valid CSS or UTF-8, or it imports one file twice in ways that can’t be merged, such as under two different
@layers. asset/invalid-script- A Script can’t be bundled: it isn’t valid JavaScript or TypeScript, or isn’t UTF-8, or it imports a name the other module doesn’t export, or a
<script type="module">names a file that is no Script. asset/jsx- A Script is a
.jsxor.tsxfile, or has JSX in it. asset/not-found- A
<link href>or<script src>in a Page, an@importorurl()in a stylesheet, or animportin a Script names a path that is no file of the project, no Static file and no URL of the Site. asset/scope-collision- Two Sidecar stylesheets have the same scope attribute, which yuanme makes from each one’s path, so each one’s styles would reach the other’s Template.
asset/script-warning- The bundler warns about a Script, or a package it imports, that works but is likely a mistake, such as calling
evalor importing a name that is alwaysundefined. asset/tailwind-error- Tailwind can’t build a stylesheet that does
@import "tailwindcss": the Tailwind CLI reports an error, such as an@applyof a utility that doesn’t exist or an@pluginit can’t find, or a stylesheet that another one imports, or a Sidecar, imports Tailwind. asset/tool-unavailable- yuanme can’t get a Managed tool the Site needs, such as the Tailwind CLI for a stylesheet that imports Tailwind, or TypeScript’s
tscwith[typescript] check = true. asset/type-error- With
[typescript] check = true, TypeScript’stscfinds a type error in a Script, or in a file a Script imports. asset/unmatched-selector- A selector in a Sidecar stylesheet can match no tag its own Template writes.
budget
budget/css- The CSS a Page loads is over its Site budget,
budgets.css: its stylesheets and<style>elements, each in kB of Brotli at quality 11. budget/fonts- The text fonts a Page loads are over their Site budget,
budgets.fonts: every font file that a stylesheet the Page loads names inurl(), or that the Page preloads, but the math font, in kB of Brotli at quality 11. budget/html- A Page’s first-flight HTML is over its Site budget,
budgets.html: the whole document in kB of Brotli at quality 11, but an Entry’s Page without its body, which the build report lists apart. budget/js- The JS a Page runs as it loads is over its Site budget,
budgets.js: its Scripts, the chunks they import and its inline<script>s, each in kB of Brotli at quality 11. budget/math-font- The math font a Page that shows math loads is over its Site budget,
budgets.math_font, in kB of Brotli at quality 11. budget/requests- A Page makes more requests on its render path than its Site budget,
budgets.requests, allows. budget/unknown-page- An Acknowledged overage in
[budgets.overages]names a URL that is no HTML Page of the Site, so it silences nothing.
config
config/deprecated- A key in Site config has been renamed.
config/engine-version- The project needs a different version of yuanme than the one running:
yuanme = "X.Y"is the oldest compatible version, with Cargo’s caret meaning, so 1.2 accepts any 1.x from 1.2 on and 0.3 accepts only 0.3.x. config/invalid-value- A value in Site config has the right type but means nothing to yuanme: a URL that isn’t absolute, a Route without its placeholder, an unknown field type, or a name that refers to nothing.
config/missing-key- Site config leaves out a key that has no default.
config/out-of-range- A number in Site config is outside the range its key allows.
config/syntaxyuanme.tomlis not valid TOML, so nothing else in it can be read.config/unknown-key- Site config has a key yuanme doesn’t know.
config/wrong-type- A key in Site config has a value of the wrong TOML type, such as a string where a number goes.
entry
entry/duplicate-data-file- Two Data files share a name, such as
data/nav.tomlanddata/nav.yaml, sodata.navwould be ambiguous. entry/duplicate-key- A key appears twice in the same mapping of front matter or a Data file, or an Org keyword that sets a field is given twice.
entry/duplicate-slug- Two Entries in one Collection have the same Slug, so they would be written to the same URL.
entry/invalid-date- A
dateordatetimefield can’t be read. entry/invalid-slug- A
slug:override isn’t a valid Slug. entry/invalid-value- A field’s value has the right type but isn’t allowed: an
enumvalue not in its list, a URL that isn’t absolute, or an item repeated in auniquelist. entry/missing-field- An Entry, or an object inside one, leaves out a field that is required:
title, or a declared field with neitheroptional = truenor adefault. entry/out-of-range- A field’s value is outside the
minandmaxits Collection declares: a string’s length in characters, or a number. entry/output-collision- Two Routes, or a Route and a Static file, would write the same file of the Site.
entry/syntax- An Entry’s front matter, or a Data file, can’t be read: it isn’t valid YAML, TOML or JSON, its
---is never closed, or the file isn’t UTF-8. entry/term-collision- Two different Terms of a Taxonomy end up with the same Slug, because a
slugsoverride inyuanme.tomlgives one the Slug of another. entry/toml-front-matter- An Entry starts with
+++TOML front matter. entry/unknown-key- Front matter, or a Data file with a schema, has a key its Collection or schema doesn’t declare, or an Org Entry has a keyword that is neither a field nor one of Org’s.
entry/unknown-language- A code block names a language that no grammar highlights, so it is shown as plain text.
entry/wrong-type- A field has a value of the wrong type, such as a number where text goes.
host
host/cache-rule- A
[[host.headers]]rule changesCache-Controlwhere yuanme’s cache policy has to hold: on a hashed file in/assets/, which must stayimmutable, or on a Page, which must revalidate withmax-age=0, must-revalidateso that a deploy shows at once. host/output-collision- A Static file has the name of a file the Host adapter writes, such as
static/_headerswith the cloudflare or netlify adapter. host/over-limit- Site config has more header rules or redirects, or a longer line, than a host yuanme supports accepts.
host/redirect-conflict- A
[[host.redirects]]rule redirects a URL the Site serves: a Page, a Static file, or a Page’s URL without its trailing/, which hosts already redirect. host/unsupported- The Site’s host can’t do what the Site needs.
host/wrangler-mismatchwrangler.jsoncdoesn’t serve the Site the way the cloudflare adapter writes it:assets.directorymust be the output directory,assets.html_handlingmust be “auto-trailing-slash”, the default, andassets.not_found_handlingmust be “404-page” for the Site’s 404 Page to be served.
image
image/invalid- An image can’t be processed: it isn’t an image yuanme reads, it is damaged, it is over 100 megapixels, or it is a Static file, which is copied as it is.
image/missing-alt- An image in an Entry’s body has no alt text, so a screen reader can only say that an image is there.
image/not-found- An image in an Entry’s body, an
imagefield orimage()names a path where no image is. image/remoteimage()is given a remote URL.image/unoptimized- A Page loads a raster image over 50 KB as it is, at full size and in its own format: a Static file, an image a stylesheet’s
url()or a<link>names, or an animated GIF, WebP or PNG.
internal
internal/panic- yuanme crashed while processing a file.
link
link/broken- A Page links to, or loads, a URL of the Site where nothing is: no Page, Static file or asset of the build.
link/redirected- A Page links to a URL of the Site that hosts answer with a redirect, which costs the visitor a round trip: a Page’s URL without its trailing
/or withindex.htmlon the end, a.htmlfile, a[[host.redirects]]rule’sfrom, or the Site’s address with or withoutwww.. link/unresolved- A link to another file or a fragment doesn’t lead anywhere in the Site: no Entry has that file as its source, or the page has no element with that id.
markdown
markdown/empty-directive- A
:::line opens a block directive with no name. markdown/no-effect- Something in a Markdown body is valid but changes nothing in the output, such as a
[title]on a directive that isn’t a Theorem block. markdown/out-of-fuel- A Markdown body would take longer to parse than yuanme allows for its length, so the build stops instead of hanging.
math
math/duplicate-label- Two things in one Entry have the same Label.
math/invalid-label- A Label has a character other than letters, digits,
:,_,.and-. math/named-environment- An Org LaTeX environment has a
#+NAME. math/tex-delimiter- A Markdown paragraph has
\(…\),\[…\]or a bare\begin{…}, which Markdown doesn’t read as math: there\(and\[are escaped brackets, as on GitHub and in Pandoc. math/unknown-label- An
\eqref, or an Org\ref, names a Label that no numbered equation in the Entry has. math/unsupported- Math uses LaTeX that yuanme can’t render, or isn’t valid LaTeX: an unknown command or environment, a group that is never closed, or
\labeloutside a numbered environment.
org
org/duplicate-id- Two Org Entries or headings have the same
:ID:property, so anid:link to it could lead to either. org/invalid-attribute- An
#+ATTR_HTMLline has text that isn’t an attribute. org/misplaced-keyword- A keyword that sets one of the Entry’s fields, such as
#+TITLEor#+DATE, comes after the first headline or body text. org/no-effect- Something in an Org Entry is valid Org but changes nothing in yuanme’s output, such as a keyword for Org’s own exporter, an
#+OPTIONSsetting yuanme doesn’t do, or a#+CAPTIONon a paragraph. org/out-of-fuel- An Org paragraph would take longer to parse than yuanme allows for its length, so the build stops instead of hanging.
org/setupfile- An Org Entry has a
#+SETUPFILE. org/too-deep- Blocks, lists or markup in an Org body nest inside each other too deeply for yuanme to parse.
org/undefined-footnote- An Org footnote reference names a footnote that is never defined.
org/unknown-option#+OPTIONShas an option Org doesn’t have, so it does nothing, in Emacs as in yuanme.org/unsupported-construct- An Org body uses something outside the Org subset: macros,
#+INCLUDE,#+CALLand other code that runs, citations, radio targets, dynamic blocks, inline tasks, headlines deeper than level 5, or a link type yuanme can’t follow. org/wrong-weekday- An Org timestamp in a date field names a day of the week that isn’t the date’s.
template
template/bad-filter-argument- A filter or function got an argument it can’t use: a missing or unknown one, a value of the wrong type, a
dateformatformat it doesn’t know, or a-key passed to Jinja’s ownsort, which reads it as a field name. template/bad-header- A props comment on a Component, or a vars comment on a Layout, can’t be read or doesn’t match its macro: an entry that isn’t
name: typeorname?: type, an unknown type, a props comment that isn’t directly above a{% macro %}, a prop the macro doesn’t have or a parameter the comment doesn’t declare, or a macro intemplates/components/with no props comment. template/bad-prop- A call to a Component passes a prop it doesn’t declare, leaves out one it requires, passes one of the wrong type or an optional value to a required prop, or gives a
{% call %}body to a Component that takes none, or none to one that needs it. template/bad-var- A Template extends a Layout without setting a variable its vars comment requires, or sets one to a value of the wrong type.
template/compare-optional- A Template compares an optional field with
==,!=,<,inor another comparison without a guard. template/non-constant-nameextends,includeorimportnames a Template with an expression.template/not-found- A Template that a Route renders, or that another Template extends, includes or imports, is not in
templates/. template/render- A Template failed while rendering a Page: it printed a value that is absent, reached through one, or did something its values don’t allow.
template/syntax- A Template is not valid Jinja, so no Page that uses it can render.
template/undeclared-input- A Component reads a variable it wasn’t given: not one of its props, nor
site,data,collections,taxonomiesorpage, which every Page sees. template/unguarded-optional- A Template prints, loops over, filters or reaches through an optional field without a guard, so a Page whose Entry leaves it out fails to render.
template/unknown-block- A Template overrides a block that no Layout it extends has, so its content would never be shown.
template/unknown-field- A Template reads a field or a variable that isn’t in the schema of what its Page sees: a typo, a field of another Collection, a value only another kind of Route has, such as
entrieson a Taxonomy’s index, or a field of something that has none, such as a string. template/unknown-filter- A Template calls a filter, test or function that neither Jinja nor yuanme has, a macro its import doesn’t define, or a method: Templates have no methods, such as Python’s
.lower(). template/unknown-urlurl()names a path that is no Route, feed or Static file of the Site, so the link would lead nowhere.template/unscoped-tag- A Template with a Sidecar stylesheet writes a tag that yuanme can’t scope, or can’t check, as written.
template/wrong-type- A Template uses a value as a type it isn’t, such as looping over a string or passing a list to
attrs.