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: replaced image shortcodes w/ image render hook #188

Merged
merged 3 commits into from
Sep 17, 2021
Merged

Conversation

h-enk
Copy link
Member

@h-enk h-enk commented Sep 17, 2021

Replaced the image shortcodes w/ render-image.html, respecting the following logic:

  • When an image width is less than the value set for smallLimit in ./config/_default/params.toml, an <img> element is used, otherwise a figure element.

See also (temporary, until merge ready): https://render-hooks--hyas.netlify.app/quick-start/

@h-enk
Copy link
Member Author

h-enk commented Sep 17, 2021

Dropped link render hook containing "target="_blank" rel="noopener" logic (G200: Opening new windows and tabs from a link only when necessary)

@h-enk h-enk linked an issue Sep 17, 2021 that may be closed by this pull request
@h-enk
Copy link
Member Author

h-enk commented Sep 17, 2021

Dropped link render hook containing email obfuscation (looks like it's not really possible). Kept email shortcode (for now, as an option, but better to avoid using email links)

@h-enk h-enk merged commit a004628 into master Sep 17, 2021
@h-enk h-enk deleted the render-hooks branch September 17, 2021 17:27
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.

Use render hooks instead of email and img shortcodes
1 participant