export const blog: BlogMeta = { title: "Marko is the coziest HTML templating language", desc: "...todo...", date: "2025-06-13", draft: true, }; export const meta = formatBlogMeta(blob); I've been recently playing around [Marko][1], and after adding limited support for it in my website generator, [sitegen][2], I instantly fell in love with how minimalistic it is in comparison to JSX, Astro components, and Svelte. ## Introduction If JSX was taking HTML and shoving its syntax into JavaScript, Marko is shoving JavaScript into HTML. Attributes are JavaScript expressions. ```marko
// `input` is like props, but given in the top-level scope
${input.user.name}
// Capital letter variables for imported components // Components also can be auto-imported by lowercase. // This will look upwards for a `tags/` folder containing // "custom-footer.marko", similar to how Node.js finds // package names in all upwards `node_modules` folders.
// ESM `import` / `export` just work as expected. // I prefer my imports at the end, to highlight the markup. import MarkdownContent from "./MarkdownContent.marko"; import { formatTimeNicely } from "../date-helpers.ts"; ``` Tags with the `value` attribute have a shorthand, which is used by the built-in `` for conditional rendering. ```marko // Sugar for // and it composes amazingly to the 'if' built-in ``` Tags can also return values into the scope for use in the template using `/`, such as `` for unique ID generation. This is available to components that ``. ```