Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

No excerpt / summary instead just (...) #17

Open
frojnd opened this issue Jan 9, 2017 · 6 comments
Open

No excerpt / summary instead just (...) #17

frojnd opened this issue Jan 9, 2017 · 6 comments

Comments

@frojnd
Copy link

frojnd commented Jan 9, 2017

Not sure if this is a theme issue or not. I fell in love with this theme so I didn't test with any other theme... The problem is that I don't see excerpt at all. I only see three dots (...) instead.

For excerpts/summaries to work do I need to set anything under config.toml?

This is the source for how excerpt with three (...) dots looks like:

<section class="post-excerpt">
    
    <a class="excerptlink" href="http://localhost:1313/post/test/"><p>&hellip;</p></a>
    
    <p class="readmore"><a href="http://localhost:1313/post/test/">Keep reading <i class="fa fa-angle-double-right" style="padding-left: 5px;"></i></a></p>
</section>

EDIT: Reading source code: https://github.com/digitalcraftsman/hugo-steam-theme/blob/master/layouts/_default/summary.html

{{ if and (not .Description) (.Site.Params.useSummaryIfNoDescription)}}

What does this line do exactly? If I don't have description inside my post/test.md then I see three dots. But if I add description = "blabla" I see "blabla" as my excerpt. Wouldn't expected behaviour be to use .Summary if no description?

@jrr
Copy link

jrr commented Jan 31, 2017

That source code you reference says that, if there's no description, and the useSummaryIfNoDescription option is enabled, then use the summary.

So, the behavior you want is hidden behind a flag. Presumably somebody did this to maintain backward compatibility.

To enable the option, put useSummaryIfNoDescription=true in your config.toml.

@frojnd
Copy link
Author

frojnd commented Jan 31, 2017

@jrr

Still not working. Only see three dots ... when putting useSummaryIfNoDescription=true in config.toml

@extraymond
Copy link

Hi! I tried this too but without success, is there anything I should be aware of?

@extraymond
Copy link

Hi! I found the way to properly do this!
I have to add the parameters in the params section in config.toml
Thx for helping!

@Teebusch
Copy link

Hi! Thank you. Had the same problem, putting
useSummaryIfNoDescription = true in the [params] section of config.toml helped.
This parameter should be there by default.

Teebusch added a commit to Teebusch/hugo-steam-theme that referenced this issue May 14, 2017
The missing parameter useSummaryIfNoDescription basically disables the use of Hugo-created summaries in the post overview, because of a conditional that cannot evaluate true. The parameter chould be in the config.taml by default to avoid confusing users.
Teebusch added a commit to Teebusch/hugo-steam-theme that referenced this issue May 15, 2017
@digitalcraftsman
Copy link
Owner

For a fix please have a look at #19

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants