Sign in

how to turn off excerpts?

  • This topic has 2 replies, 2 voices, and was last updated 1 month, 1 week ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8062
    Avatar photonone

    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/

     

    --
    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!

    #8065
    Avatar photonone

    @Bob it works! thanks so much!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘how to turn off excerpts?’ is closed to new replies.