wlh320 / hugo-theme-hulga

A hugo blog theme based on bulma css
https://wlh320.github.io/hugo-theme-hulga/
MIT License
28 stars 15 forks source link

add an option to display post content #5

Closed oupala closed 2 years ago

oupala commented 2 years ago

Could you add add an option to display the post content on the home page (and pagination) and not only the post title?

It could also be cool to display the post title, and an excerpt on the post content.

This could be set by configuration into the config.toml file.

wlh320 commented 2 years ago

Thank you for your reply. I used to try to add this feature, but hugo's summary function does not work well when content is written in Chinese, so I did not add it to the main branch.

I added this feature again in the newest commit, you can enable it by adding showSummary = true in [params] section of config file, and check it out.

oupala commented 2 years ago

I had two request in my issue. I shouldn't have done this as this make the issue less clear.

My first request was to offer the ability to display the content of each post when displaying the list of posts. You did not answer this request.

My second request was the ability to display only the summary of each post when displaying the list of posts. You did answer this request.

I would advise you to change the variable as is:

[param]
showContent = all # to display the whole content of each post in the list of posts
showContent = summary # to display only the summary of each post in the list of posts

I hope I was more clear in this message.

oupala commented 2 years ago

I had a closer look at the post page, and in fact, I was thinking about displaying the post page the same way the post list is displayed:

See this example from a Hexo theme named bootstrap-blog:

You might not agree with my proposition, I have no problem with that. Just tell me and I will consider forking.

wlh320 commented 2 years ago

I got your idea. This theme is not designed for showing full content of article in home page. So I think you can fork this project and maintain your own branch. Thank you!

oupala commented 2 years ago

Great thank you.

This issue can then be closed.

code-foreman commented 1 year ago

Hey where can I see the repo for the hugoBasicExample or the demo? Thanks!

wlh320 commented 1 year ago

Hey where can I see the repo for the hugoBasicExample or the demo? Thanks!

Hi, you can find hugoBasicExample in here, it is an offcial repo provided by hugo to test themes. And the demo site is also based on this repo, with some configs of my theme. These configurable options are shown in README file.

code-foreman commented 1 year ago

Thank you!!