I am setting my blog up using the fantastic Jekyll. Question is my markdown files are being shown in full on the homepage. How do i make them look more like this? So that only a little bit comes up with the title?
Thanks.
I am setting my blog up using the fantastic Jekyll. Question is my markdown
Share
EDIT: As of Jekyll 1.0, this is not longer necessary (Answer is outdated).
Jekyll 1.0 exports a
post.excerptvariable that contains the first paragraph of a post by default./Edit
So, you want to show an excerpt of the post, instead of the full post?
Theres three ways to do that:
post.content, use thetruncatefilter to truncate it and themarkdownifyfilter to render it.{{post.excerpt | markdownify}}(that is what i do on my blog)