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: support link in code block title #523

Merged
merged 5 commits into from
Dec 28, 2024
Merged

feat: support link in code block title #523

merged 5 commits into from
Dec 28, 2024

Conversation

strowk
Copy link
Contributor

@strowk strowk commented Dec 22, 2024

This introduces new attribute filename_uri_base that adds to codeblock rendering a feature allowing to render a link from the code block title to wherever the sources could be looked up.

image

UPD: you can see it here: https://deploy-preview-523--hugo-hextra.netlify.app/docs/guide/syntax-highlighting/#link-to-file

Copy link

netlify bot commented Dec 22, 2024

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit b36475c
🔍 Latest deploy log https://app.netlify.com/sites/hugo-hextra/deploys/676ff11778251f00084073c1
😎 Deploy Preview https://deploy-preview-523--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@imfing
Copy link
Owner

imfing commented Dec 26, 2024

@strowk thanks a lot! I like the idea. I’ll take a closer look at it soon.

@imfing imfing merged commit 26a298d into imfing:main Dec 28, 2024
4 checks passed
@imfing
Copy link
Owner

imfing commented Dec 28, 2024

@strowk I simplified the implementation a bit by using more hugo builtin methods

also renamed the param filename_uri_base to base_url (let me know what your thoughts are) cuz it's a bit lengthy imo

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.

2 participants