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

Question/Bug? - Setting post excerpt #719

Shu-Wan opened this Issue Dec 19, 2016 · 3 comments


None yet
3 participants
Copy link

Shu-Wan commented Dec 19, 2016

  • This is a question about using the theme.
  • I have updated all gems with bundle update.
  • I believe this to be a bug with the theme --- not Jekyll, GitHub Pages or one of the bundled plugins.
  • I have tested locally with bundle exec jekyll build.

Environment informations

  • **Minimal Mistakes version:4.1.0
  • **github-pages or jekyll gem version:3.3.1
  • **Operating system: macOS Sierra 10.12.2

Expected behavior

I wanted to set my own excerpt for posts instead an auto-generated one. Therefore, I added an excerpt value into my YAML front matter, but it doesn't work. The pages still use auto-generated one instead I added.

Steps to reproduce the behavior

I checked out the layout file, and find out excerpt is referenced in the includes/archive_single.html by the following code.

{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}

I notice itemdrop='description' and post.excerpt are sourcing different content from the post. Therefore, I tried to change either of them to make them both source from description or excerpt. Then I can have my own excerpt rather than an auto-generated one.

For example

{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.description | markdownify | strip_html | truncate: 160 }}</p>{% endif %}

Is it an inconsistency bug or I understand it incorrectly? All files are in my GitHub repo.

Thanks for the help!


This comment has been minimized.

Copy link

mmistakes commented Dec 19, 2016

Strange. It appears to be working correctly on the demo site.

If you check out this archive page
and scroll down, the post titled "Layout: Excerpt (Defined)" has an excerpt that has been manually set.

screen shot 2016-12-19 at 10 23 08 am

The excerpt override was set just as you did with excerpt: in the post's YAML Front Matter.

title: "Layout: Excerpt (Defined)"
excerpt: "This is a user-defined post excerpt. It should be displayed in place of the post content in archive-index pages."
  - Layout
  - Uncategorized
  - content
  - excerpt
  - layout

This is the post content. It should be displayed in place of the user-defined excerpt in archive-index pages.

This paragraph should be absent from an archive-index page where `post.excerpt` is shown.

Do you have a public repo somewhere and a link the source of the post that's not working? Not that it should matter but is it a post, a page, or a collection document?


This comment has been minimized.

Copy link

Shu-Wan commented Dec 19, 2016

Hi Michael, thanks for your reply!

I changed the archive-single.html to original and it works correctly this time.

I have no idea why it didn't work last night. Sorry for the trouble I made!

Thanks again for your help and this amazing theme.


This comment has been minimized.

Copy link

nebrelbug commented Mar 6, 2019

I found the issue for me was that I was running bundle exec jekyll serve -i. When I changed it to bundle exec jekyll serve it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.