Skip to content

Installation

  1. Install the package.

    Terminal window
    npm install emdash-header-footer-code
  2. 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()] }),
    ],
    });
  3. Check that your layout renders <EmDashHead />, <EmDashBodyStart /> and <EmDashBodyEnd />. The EmDash starter already does. See Theme setup.

  4. Redeploy your site.

  5. Open Header & Footer Code in the admin sidebar, or go to /_emdash/admin/plugins/header-footer-code/snippets, and add your first snippet.

Update the package and redeploy:

Terminal window
npm install emdash-header-footer-code@latest

Within a major version an update never adds a capability. See Versioning.