astro-seo icon indicating copy to clipboard operation
astro-seo copied to clipboard

Any chance of a code snippet of assigning the constants and calling them in the page template?

Open danielrosehill opened this issue 1 year ago • 1 comments

I've been going around in circles for a while trying to figure this out!

I'm integrating the component into a site built off of an Astro template.

To test it out, in index.astro I set:

const title="Daniel Homepage";

In header.astro I call:

import { SEO } from "astro-seo";

And I tried:

<SEO title={title}

But I get:

ReferenceError An error occurred. title is not defined

I've been using the code snippet from the repo but that has the dummy values of course

Is there nay way you could show a working example with a "typical" Header -> Layout -> Page hierarchy?

danielrosehill avatar Jun 26 '24 17:06 danielrosehill

I wonder the same. I'm using a layout which contains the <head> . @danielrosehill did you find a solution, or how did you implemented this?

marceloverdijk avatar Oct 30 '24 09:10 marceloverdijk