Open Huilin-Li opened 3 months ago
hello! There is no configuration for this text (it uses summary provided by Hugo). But you can adjust template if you want in
/layouts/posts/list.html
https://github.com/alex-shpak/hugo-book/blob/master/layouts/posts/list.html#L9
hello! There is no configuration for this text (it uses summary provided by Hugo). But you can adjust template if you want in
/layouts/posts/list.html
https://github.com/alex-shpak/hugo-book/blob/master/layouts/posts/list.html#L9
@alex-shpak Hi, Alex, thanks for your reply. Since I don't have too much knowledge about html language, may I ask what key words I need to google about modifying your layout repository? For example, you point out the line-9
in layouts/posts/list.html
, and I checked it is {{- .Summary -}}
. So, I go to google html .Summary
. However, google gives me all things about how to use <summary></summary>
in <details></details>
as a markdown.
I think there must be a knowledge gap, so I don't understand the code in layouts folder. Would you mind sharing some information or experience about learning and practicing these things? Thanks in advance!
In this case it depends you will probably have to either regex your content or find some other trick, value of .Summary
in hugo is very primitive
For example, in this place (highlight in red rectangle), I only want to show the first paragraph of each blog.![image](https://github.com/alex-shpak/hugo-book/assets/52614985/6e741adc-b665-4e63-8c4c-f74ee8ee696e)