Header and footer
Addheader.mdx or footer.mdx next to blog.json, and each replaces the theme’s own. Write plain markup with Tailwind classes. You can paste HTML from your landing page if you change class to className, close empty tags like <img /> and remove <!-- --> comments, because these files are MDX.
header.mdx
Interactive parts like a mobile menu go in a component in
snippets/ that you import as usual. See Your own components. Wrap your content in site-container to give it the same width as the posts below (it follows layout.width). Theme colors are available as these Tailwind classes: bg-background, text-foreground, bg-muted, text-muted-foreground, border-border, bg-card, bg-primary and text-primary.
Write your site name and links into the header and footer directly. Both get the current page as page (index, entry, author, tag or not-found), area (blog or changelog), path, language (like en) and, with translations, languages, also available as props.page, props.area, props.path, props.language and props.languages, so you can show something on some pages only:
footer.mdx
appearance.storageKey to the same key so <ThemeToggle /> and your main site share it.
With your own header, the navbar IDs like #topbar-cta-button don’t exist, so use your own class names. Under your footer, Notra adds a row with a “Report abuse” link and, when Notra branding is on, the “Powered by Notra” badge. Style it with #notra-attribution so it matches your footer:
style.css
Slots
Slots add your own content at fixed places, and each one is a file inslots/. Every slot gets site, area and language, and some get more:
url is the full address on your site’s domain, like https://acme.com/blog. path is the same address without the domain, like /blog, as the theme’s own links use it, so links stay on previews and on the domain the page is served from. Use path for links on the page and url where you need a full address, like a share link.
To link back to the blog or changelog home, use area.path. Don’t write a relative link like ../: pages have no trailing slash (/blog/launch, and /blog/launch/ redirects there), so ../ from a post goes to the root of the domain, not to /blog.
Each page keeps one <h1>. When a slot, header.mdx or footer.mdx renders its own <h1>, such as a post title in slots/before-post.mdx, the build turns the theme’s title into a plain <div> that keeps its #page-title id and styling. Search engines and AI assistants then read your heading as the page title, and the post’s structured data keeps its headline.
The hero slots span the full content width, so wrap their content in <div className="mx-auto max-w-(--layout-index)"> to line it up with the posts below.
slots/after-post.mdx
before-footer gets area as blog or changelog rather than the object above, and the object as section instead, so section.path links to the current home. To show it on posts only, check the page:
slots/before-footer.mdx
author-hero replaces the avatar, name, bio and profile buttons, so add your own <h1>. socials lists the profile links in the order the theme shows them, with the website last. Keep rel="me" on the links so a Mastodon profile can verify the page:
slots/author-hero.mdx
slots/ with any other name stops the build with Unknown slot and the list of valid names. Inline SVG in a slot, header or footer takes its attributes the HTML way, like stroke-width, because the React form strokeWidth is dropped.
Your own CSS
For anything the settings and files don’t cover, addstyle.css, which loads after the theme so it can override any style. See Design and CSS.
What isn’t allowed
Header, footer and slots follow the same rules as posts, so imports only come from your repository and Notra doesn’t allow<script> tags. Put JavaScript in script.js instead. See Custom scripts.