Sign in

How to display complete posts instead of excerpts?

  • This topic has 1 reply, 2 voices, and was last updated 4 months, 3 weeks ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6873
    WpQ

    Hello!

    I am brand new to Publii and it seems to be a fantastic tool. I am used to generating static sites via Hugo or Jekyll but for my wife, this is a godsend.

    When setting up her test site I was trying to find a way to publish whole posts instead of just excepts. Is this possible?

    #6874
    Bob

    The easiest and more simple way to do this is to use the Readmore button at the end of the post content.
    You can also edit the index.hbs file ‎⁨(Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME) and change the following part of code:

    {{#if hasCustomExcerpt}}
       {{{ excerpt }}}
    {{else}}
       <p>{{{ excerpt }}}</p>
    {{/if}}

    to:

    {{#if hasCustomExcerpt}}
       {{{ excerpt }}}
    {{else}}
       {{{ text }}}
    {{/if}}

    That’s it.

    To preserve your custom code and prevent it being overwritten the next time the theme is updated, please ensure that you have created override files; these are, essentially, copies of the existing theme files that are stored separately from the main theme fileshttps://getpublii.com/dev/theme-overrides/

     

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

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