releases
Release v1 is here, learn what new features are available and how to migrate.
After releasing 0.x it was clear that the package was missing some functionality:
After a few weeks rebuilding the core and struggling with the module resolutions, I've managed to solve all of the above.
Breaking changes were attempted to be minimised but have been implemented where needed to simplify the API.
The package now supports mocking out runtime define functions and components for client-side builds.
client
User Config for more details.body
to avoid slowing down DOM renderTypes for define functions are now runtime, supporting switching the types being used.
full
User Config for more details.MaybeRef
able.The core was rebuilt and is now available as its own package: @unhead/schema-org.
As a first step, you should follow the new installation docs for your framework again and verify integration is up-to-date:
To allow for empty define functions while providing a strict API, the define${Node}Partial
functions existed. This has been removed to simplify the API.
You will need to remove any define partial functions in favour of the main define functions.
defineWebPagePartial({
// ...
})
render-scoped-slots
removedPreviously you were able to provide the render-scoped-slots
prop to allow scoped slots to render. This was useful
to minimise code, but was removed as the functionality was misleading.
You will now need to render within the default slot.
<template>
<SchemaOrgQuestion render-scoped-slots>
<template #question>
What is the question?
</template>
<template #answer>
Not sure
</template>
</SchemaOrgQuestion>
</template>
<template>
<SchemaOrgInspector />
</template>
defineWebSite({
potentialAction: [
asSearchAction({
target: '/search?q={search_term_string}'
})
]
})
Once you have finished migrating, it's worth re-testing your Schema.org using https://validator.schema.org/ and https://search.google.com/test/rich-results.
If you see any issues please create an issue.