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

Abbreviations in the summary show the full definition in the category view #1

Open
CarlSinclair opened this issue Jul 4, 2024 · 1 comment · May be fixed by #2
Open

Abbreviations in the summary show the full definition in the category view #1

CarlSinclair opened this issue Jul 4, 2024 · 1 comment · May be fixed by #2

Comments

@CarlSinclair
Copy link

When you're browsing posts by category, if any words in a post's summary have glossary definitions, all the definitions are included within the summary.

I don't see a workaround for this since Grav doesn't allow for a way to set a custom summary. I tried to sanitize it within the template but that's not working, probably because the injection is happening after the template is generated, not before.

@CarlSinclair
Copy link
Author

I fixed it by disabling the insert abbreviations function and replicating its functionality in a JavaScript file that is only loaded inside the item template. I needed to expose the definitions into inline <script> tags which probably isn't ideal for many reasons but hopefully this is only temporary.

@CarlSinclair CarlSinclair linked a pull request Jul 27, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant