Download
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.

how to turn off excerpts?

  • #8062
    Avatar photo[anonymous]

    i would be grateful for any suggestions re the following : i would like to publish one post per page and to publish the entire post, not an excerpt. however there seems to be no way to turn off excerpts and when i set the excerpt length to say 500 all my paragraph breaks disappear.

    thanks!

    #8063
    Avatar photoBob

    Hey none.
    You can set the Read more button at the end of the post or modify the index.hbs file as follow:
    Go to the follwing location: ‎⁨(Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME) and edit the index.hbs file:

    Replace the following code snippet:

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

    with:

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


    PS: 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 files
    https://getpublii.com/dev/theme-overrides/

    #8065
    Avatar photo[anonymous]

    @Bob it works! thanks so much!