-
Notifications
You must be signed in to change notification settings - Fork 44
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
Dynamic SEO / Open Graph Tags #1089
Labels
📖 documentation
An update on documentation.
Comments
I know that SLUB Dresden also provides Open Graph tags for their digital documents. Maybe @beatrycze-volk or @ByteParty can give some insight on how they achieve this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Problem
Currently documents displayed in pageview are missing valuable meta-tags in the html-head, that could be used for SEO and Open Graph Tags. The output of Highwire-Press-Tags and DC-Schema-Tags would be appreciated.
Proposed Solution
I just wanted to share this solution, that we have presented in the Praxistreffern 2023 in Berlin, so it could be used as an inspiration or base for further development. I believe here is more room for discussion.
A possible path to do this, would be to use the output of the metadata-plugin (and pageview-plugin), to enrich the html head with such tags. Fluid can change the html-head through the
<f:section name="HeaderAssets">
(https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/8.6/Feature-79409-AutorenderAssetSectionsInFluidTemplateWithController.html). In order for it to work, the data needs to be in the{settings}
variable. This would require a pre-structured output of the metadata into the settings variable as well, which then gets passed to the view (if possible). At least for some core bibliographic data this should be more or less universal for all users.Open Graph Tags work best with a thumbnail image, which could be grabbed from the pageview-plugin, which already knows about the image currently shown.
Mockups and Examples
In our approach, we currently circumvented the issue with the
{settings}
variable by using the vhs-viewhelpers function to set a custom variable in the template. This is then later used in the HeaderAssets section.e.g. Metadata/Main.html
e.g. PageView/Main.html
Target Version
I was only able to test the fluid-section mechanism with Kitodo.Presentation 4.0.1 and Typo3 10.4.36, but i believe it to work with newer typo3 versions as well.
Additional Context
The Meta-Tags (especially highwire and dc) are favored by search engines and would have a higher impact then just the output of the metadata-plugin in the applied wrappers. Open Graph Tags are favorable, when sharing links to documents over social media, as it gets displayed as an eye-catching card.
The text was updated successfully, but these errors were encountered: