Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danielrosehill opened this issue Jun 26, 2024 · 1 comment

Comments

@danielrosehill
Copy link

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?

@marceloverdijk
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants