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

language property is not used #150

Open
stephane opened this issue May 23, 2023 · 3 comments
Open

language property is not used #150

stephane opened this issue May 23, 2023 · 3 comments
Labels
bug Something isn't working todo

Comments

@stephane
Copy link

Describe the bug

I set the language property to Head component but I don't see the rendering of this information.
Tested with v0.0.8.

Additional context

The value is passed to https://github.com/spences10/svead/blob/main/src/lib/components/schema-org.svelte via SchemaOrgProps but not used by the component.

@spences10 spences10 added bug Something isn't working todo labels May 25, 2023
@spences10
Copy link
Owner

Oh! Ok! Thanks for this!

So it looks like the language prop isn't passed to the schema-org.svelte component, corrrect?

I'm happy to accept a PR if you want to make the change otherwise I'll get it in there next time I'm working on it.

@spences10
Copy link
Owner

Hey @stephane I've done a refactor of the component, instead of having a load of differing props I've moved everything into one config object, this enables you to have standard props that won't typically change in a exportable config that you can spread into the main config.

The language tag is in the schema for it now and I've added tests to cover it. Just to be clear this doesn't change the <html lang='en' attribute, that's something that will need to implemented on the user side as the component doesn't have access to the app.html file.

It will be a breaking change but it will mean the component is simpler to use with a lot of the complexities abstracted away 😅

It will enable schema.org data along with JSON-LD data to be added to it too

With that being said there's an issue with hydration markers in Svelte breaking the JSON-LD parsing, so, until that is resolved JSON-LD parsing will not work

I'll continue with the refactor and release with the broken JSON-LD functionality if it's not fixed on the Svelte end in that time 😊

@spences10
Copy link
Owner

Inked issue for context: sveltejs/svelte#10130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working todo
Projects
None yet
Development

No branches or pull requests

2 participants