Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code is not displayed correctly in home preview #2

Closed
Nhoya opened this issue Nov 23, 2019 · 2 comments
Closed

Code is not displayed correctly in home preview #2

Nhoya opened this issue Nov 23, 2019 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@Nhoya
Copy link

Nhoya commented Nov 23, 2019

Hi,
seems that posts containing code in the home preview are displayed incorrectly:

Home:
immagine
Post:
immagine

@flowchartsman
Copy link

This is probably because you are not manually splitting your post with <!--more-->, so Hugo is automatically generating a summary and stripping the HTML:

https://discourse.gohugo.io/t/summary-page-shows-the-content-of-shortcode-script-html-element/18444/2
https://gohugo.io/content-management/summaries/

Try manually splitting the post and see what happens.

@Nhoya
Copy link
Author

Nhoya commented Dec 1, 2019

this fixed the issue, thanks

@Nhoya Nhoya closed this as completed Dec 1, 2019
@dillonzq dillonzq added the documentation Improvements or additions to documentation label Feb 8, 2020
dillonzq pushed a commit that referenced this issue Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants