In general, you need to add the following code to the listings (index.hbs, author.hbs , tags.hbs files – (Documents ▸ Publii ▸ sites ▸ YOUR_SITE ▸ input ▸ themes ▸ YOUR_THEME)
{{#if hasCustomExcerpt}}
<div>
{{{ excerpt }}}
</div>
{{else}}
<p>
{{{ excerpt }}}
</p>
{{/if}}
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/