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

Added configurable post excerptation via the site.excerpt_posts confi… #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ about configuration can be found on the [Jekyll Documentationn][jekyll]
`author_thumbnail` | Path to author's thumbnail image.
`author` | Name of the author.
`paginate` | Number of posts to show per page, More information can be found in the [Jekyll Documentationn][jekyll].
`excerpt_posts` | True if posts should be excerpted on main page, false if the full posts should be shown

### Social profile links

Expand Down
5 changes: 4 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Your awesome title
tagline: And Tagline
email: [email protected]
description: > # this means to ignore newlines until "baseurl:"
Hi, I’m a professional UI/UX designrer and web developer.
Hi, I’m a professional UI/UX designer and web developer.
I love being minimal and creative.
baseurl: "/gaya" # the subpath of your site, e.g. /blog/
url: "http://gayan.me" # the base hostname & protocol for your site
Expand Down Expand Up @@ -45,6 +45,9 @@ permalink: pretty
# Pagination config
paginate: 5

# Post excerpt setup
excerpt_posts: true

# Files/Folders to be excluded from generated _site folder
exclude:
- CNAME
Expand Down
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ <h1 class="post-title">
</span>
</p>

{{ post.excerpt }}
{% if site.excerpt_posts %}
{{ post.excerpt }}
{% else %}
{{ post.content }}
{% endif %}
<a href="{{ post.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url | }}">
Continue reading »
</a>
Expand Down