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

Article previews/relative links: apply site-wide through templates or partials, instead of shortcode? #21

Open
michael-ames opened this issue Jan 21, 2022 · 0 comments

Comments

@michael-ames
Copy link

I've been looking for a way to automatically generate simple page previews for internal links on my site.
The relative links shortcode you shared back in 2019 works like a dream when I add it to my markdown files manually — but I'm wondering if you could take a guess at how it could be applied site-wide, automatically?

It's easy enough to apply a class to all internal links using a render hook, but I'm guessing I'd need a modified layout template or partial to look for any such links on a page, range over them, and and then insert/apply the shortcode.

If you have any suggestions (or even warnings!), let me know.

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

No branches or pull requests

1 participant