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

fix: fixing doclink variable that is not working correctly #631

Merged
merged 2 commits into from
Apr 6, 2022

Conversation

Kevindm14
Copy link
Contributor

@Kevindm14 Kevindm14 commented Apr 6, 2022

I fixed the doc link plush variable that is not working correctly. The issue is: Issue

I changed that plush code for the <%= doclink() %> to Hugo Code to redirect correctly to https://pkg.go.dev/{link} because plush is not working in MD (Markdown). To fix this I used Hugo ShortCodes in replacement of Plushes Variables

I read the documentation to learn to use Hugo shortcodes, I was seeing that it is interesting because it is reusable code, I used the {{< customShortCode >}} regarding the Hugo ShortCode Documentation.

I created a HTML file for the ShortCode that is <a href="https://pkg.go.dev/{{.Get href }}">{{.Get "message" }}</a>

The custom shortcode is about redirecting the user to the go packages page pkg.go.dev/{package}

@paganotoni
Copy link
Member

Thanks for this one @Kevindm14

Copy link
Member

@paganotoni paganotoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! THanks!

@paganotoni paganotoni merged commit b97dbc4 into gobuffalo:main Apr 6, 2022
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