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

feat: check .HasShortcode mermaid #223

Merged
merged 1 commit into from
Oct 14, 2020
Merged

Conversation

peaceiris
Copy link
Owner

https://gohugo.io/templates/shortcode-templates/#checking-for-existence

You can check if a specific shortcode is used on a page by calling .HasShortcode in that page template, providing the name of the shortcode. This is sometimes useful when you want to include specific scripts or styles in the header that are only used by that shortcode.

@peaceiris peaceiris merged commit dc4889d into master Oct 14, 2020
@peaceiris peaceiris deleted the enhance-mermaid-shortcode branch October 14, 2020 10:10
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 this pull request may close these issues.

1 participant