We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
current logic looks strange when display long link
e.g.
markdown content
--- title: "test" refs: - name: long url test link: https://github.com/Ice-Hazymoon/hugo-theme-luna/blob/abadd6cbef141aaa99d2fa6f5d012e11c7112347/layouts/partials/article/components/refs.html#L9 - name: short url link: https://google.com - link: http://link-without-name-set ---
official version
my version
code changed
only changed this line >{{- if $ref.name -}}{{- $ref.name -}}{{- else -}}{{- $ref.link -}}{{- end -}}</a
>{{- if $ref.name -}}{{- $ref.name -}}{{- else -}}{{- $ref.link -}}{{- end -}}</a
whole refs.html
{{- if .Params.refs -}} <div class="w-full overflow-x-hidden border-t border-b bg-gray-100 bg-opacity-80 p-6 dark:border-darkBorder dark:bg-darkBgAccent md:px-10"> <div class="mb-2 inline-block border-b-2 border-text pb-1 text-base">{{- T "post.refs" -}}</div> <div class=""> {{- range $index, $ref := .Params.refs -}} <div class="overflow-hidden text-ellipsis whitespace-nowrap text-sm leading-loose"> <span>[{{- add $index 1 -}}] </span> <a class="hover:underline" href="{{- or $ref.link "javascript:;" -}}" target="_blank" rel="noopener noreferrer" >{{- if $ref.name -}}{{- $ref.name -}}{{- else -}}{{- $ref.link -}}{{- end -}}</a > </div> {{- end -}} </div> </div> {{- end -}}
The text was updated successfully, but these errors were encountered:
Sorry, I don't understand what you are trying to achieve
Sorry, something went wrong.
Sorry, it was descriped in more detail
No branches or pull requests
current logic looks strange when display long link
e.g.
markdown content
official version
my version
code changed
only changed this line
>{{- if $ref.name -}}{{- $ref.name -}}{{- else -}}{{- $ref.link -}}{{- end -}}</a
whole refs.html
The text was updated successfully, but these errors were encountered: