parsiya / Hugo-Shortcodes

Parsia's Hugo Shortcodes
MIT License
106 stars 14 forks source link

Blockquote won't show title if there is no link #7

Closed paskal closed 6 years ago

paskal commented 6 years ago

Hello, friend! $subj. Example:

{{< blockquote author="Марк Аврелий" title="Наедине с собой" link="http://www.opentextnn.ru/man/?id=518" >}}
Да живи ты хоть три тысячи лет, хоть тридцать тысяч, только помни, что человек никакой другой жизни не теряет, кроме той, которой жив
{{< /blockquote >}}

If I remove link, title will go away, which is not good in my opinion - one should be able to quote the book without linking. By the way, thanks for the plugin again, it's amazing.

parsiya commented 6 years ago

Good catch, thanks for letting me know. This was also a problem if I had a title and no link. The title would be an empty link.

I have fixed it and added the test case to the blockquote test file.

Quote with title and no link
{{< blockquote author="Author5"  title="Google" >}}
  This is a quote from Author5 and links to https://www.google.com with title "Google."
{{< /blockquote >}}

image