Installation
-
Install the package.
Terminal window npm install emdash-header-footer-codeTerminal window pnpm add emdash-header-footer-codeTerminal window yarn add emdash-header-footer-code -
Register the plugin with EmDash.
astro.config.mjs import { defineConfig } from "astro/config";import { headerFooterCode } from "emdash-header-footer-code";export default defineConfig({integrations: [emdash({ /* … */ plugins: [headerFooterCode()] }),],}); -
Check that your layout renders
<EmDashHead />,<EmDashBodyStart />and<EmDashBodyEnd />. The EmDash starter already does. See Theme setup. -
Redeploy your site.
-
Open Header & Footer Code in the admin sidebar, or go to
/_emdash/admin/plugins/header-footer-code/snippets, and add your first snippet.
Updating
Section titled “Updating”Update the package and redeploy:
npm install emdash-header-footer-code@latestWithin a major version an update never adds a capability. See Versioning.