Skip to content

Getting Started

Here’s how to setup astro-lilypond to begin displaying notation on your site.

  1. Create an Astro project.

    Terminal window
    pnpm create astro@latest
  2. Install astro-lilypond.

    Terminal window
    pnpm astro add astro-lilypond
    Not working?

    If astro add can't install the package and update your config automatically, manually install the package...

    Terminal window
    pnpm add astro-lilypond

    ...then add the integration to your Astro config:

    astro.config.mjs
    import { defineConfig } from 'astro/config';
    import lilypond from 'astro-lilypond';
    export default defineConfig({
    integrations: [lilypond()],
    });
  3. Start writing music!

    You can do a lot with LilyPond; view the examples. Write your LilyPond code directly in Markdown, or render .ly files with <Score>.

When writing music locally, it’s recommended to install the LilyPond binary so that you can compile scores in other tools. If the binary is unavailable (for example, when building and deploying your site), astro-lilypond will install it automatically.

Download LilyPond v2.26.0

Or install via Homebrew:

Terminal window
brew install lilypond