Comments (6)
@timtorres, thanks for this. I think there's no valid reason for using shortcodes in stead of render hooks. Will be looking into this ... soonish.
Input: bep/portable-hugo-links
from hyas.
Implemented the image render hook (really nice, thanks for triggering this), but dropped the link render hook β see also #188
from hyas.
To split things (and keep better track), I've created two discussions: Opening links in a new tab or window? + Add email obfuscation?
from hyas.
Just noting this affects the blog archetype (removing shortcode reference)
from hyas.
document.write("<a href='mailto:{{ $address }}'>" + "{{ with .emailTitle }}{{ . | safeHTML }}{{else}}{{ $address }}{{end}}" + "</a>");
This way, an email address ($address
) will still be scrapable when viewing the page source.
from hyas.
Great, nice one π
This way, an email address ($address) will still be scrapable when viewing the page source.
Ha yeah, this was still WIP as I explored some methods. Nothing's perfect but I found a good (but old) breakdown of some different methods and your original and noscript
fallback worked well enough for me as a balance between simplicity and effectiveness.
Replying to some of your notes from #188 here just to keep in context:
Dropped link render hook containing "target="_blank" rel="noopener" logic (G200: Opening new windows and tabs from a link only when necessary)
This makes sense when linking within the same or related domains, noting the exceptions provided, but isn't the general practice to open links leading to a new website in a new tab? If my users click on an external link then I'm losing them by directing them away from my site. I've rarely seen it done and I would rarely recommend it.
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)
I don't understand this one - the link render hook would do the same thing as the shortcode, whether or not obfuscation is effective, without having to use the shortcode. So better and easier workflow for editors. And markdown supports email links whether or not you're using a render hook, also making the shortcode unnecessary: [[email protected]](mailto:[email protected])
or <[email protected]>
from hyas.
Related Issues (20)
- Add dismissible global alert
- Adding images in markdown breaksdown HOT 3
- Add image partial HOT 1
- Should KaTeX be removed from hyas? HOT 3
- Remove section definition in index.html HOT 1
- Better images support
- Update lint scripts HOT 2
- Restructure Hyas setup
- Update Google Lighthouse gist HOT 1
- Project Dependency hugo-installer Doesnβt Support Hugo Versions Above v0.101.0 HOT 2
- Unused configuration parameters HOT 2
- Add Prettier code formatter HOT 1
- Add --renderToDisk scripts HOT 3
- Embedded YouTube video iframe invisible in production build HOT 4
- Hugo executable files are gone after adding custom dependencies HOT 6
- Add command to check for deprecation of functions, methods, etc HOT 1
- building fails after update to lates packages HOT 2
- Hyas Build Failure with Hugo v0.123.4 on Darwin/ARM64 Architecture HOT 6
- It's generally polite to ask HOT 2
- Norrsken is a simple blog theme, designed to be an archive for all your digital things. Available mid 2024!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyas.