htmlhead metadata

Declare htmlhead metadata to inject HTML code into the HTML head element of a webpage generated from your Aneamal file.

It is preferable to use native Aneamal means such as an author metadata declaration when possible. Some HTML features have no equivalent in Aneamal though or can only be declared once while you may want them twice. htmlhead metadata is the solution then. Make sure to add only secure, valid code.

You can declare htmlhead metadata multiple times inside the same Aneamal file with linked or embedded files as value. Their content will be added to the webpage.

Example

This example assigns an embedded file containing HTML meta and link elements to the htmlhead metadata name:

@ htmlhead
@ |<meta name='noodle-site-verification' content='Oi8vYW5lYW1hbC5vcmcv'>
@ |<meta name='designer' content='Geordi La Forge'>
@ |<link rel='preload' href='/logo.svg' as='image'>

The HTML head of the generated webpage could turn out as follows then:

<head>
<meta charset='UTF-8'>
<title>…</title>
<meta name='generator' content='Aneamal'>
<meta name='noodle-site-verification' content='Oi8vYW5lYW1hbC5vcmcv'>
<meta name='designer' content='Geordi La Forge'>
<link rel='preload' href='/logo.svg' as='image'>
<link rel='stylesheet' href='/@look.css?1698079727'>
</head>

It contains the link and meta elements injected via the htmlhead metadata declaration, but also a bunch of elements automatically added by the Aneamal Translator.

See also