Sign in
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Adding HTML in Featured Image

  • This topic has 4 replies, 2 voices, and was last updated 1 month, 2 weeks ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #11528
    Avatar photoBogdan


    I’m just getting used to Publii and so far it’s everything that I wanted, congrats!

    I just wonder if there is any method so I can add HMTL to Credits field in post Featured Image -> (Theme Technews – free).

    The reason is simple, since I plan to use Unsplash I would really want to give a proper credit to the authors and Unsplash provide something like “Photo by Christian Lue on Unsplash

    Thank you!

    Avatar photogiampiero

    Hello Bogdan,

    if you want a text field to render HTML, follow these steps:

    1. in theme folder create a “technews-override” folder (more on creating folder overrides in the documentation)
    2. in the folder create post.hbs file and paste all the code of the correspondent file in the input/themes/technews/post.hbs (or simply copy the file and paste it in the technews-override folder)
    3. find this code in the file:
      {{#checkIfAny caption credits}}

      and add another couple of curly braces around credits: {{{credits}}}

    4. Now in the credits text field you write HTML and it will be rendered

    Made a short screencast:

    Repeat the process for the template without sidebar, file name: post-alternative.hbs

    Avatar photoBogdan

    Thank you! 🙂

    Avatar photogiampiero

    You’re wellcome.

    I deleted the video, because I noticed that my mother-in-law was talking in the background! 😆

    Avatar photoBogdan

    No problem, it was nice hearing her, she seems full of joy and happy 😀

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.