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

Move-in ready #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Move-in ready #16

wants to merge 4 commits into from

Conversation

deberon
Copy link

@deberon deberon commented Mar 5, 2017

I needed to make some changes in order for the theme to be "move-in ready" for me. I think the changes are generic enough that everyone could benefit. The most noticeable change would be the switch from using the full post content to just a summary and a read more link on the index page.

@@ -8,7 +8,8 @@
<div class="post">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<span class="post-date">{{ .Date.Format .Site.Params.DateForm }}</span>
{{ .Content }}
<p>{{ .Summary }}</p>
<p><a href="{{ .Permalink }}" >Read more</a></p>
Copy link
Owner

@tummychow tummychow Mar 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see in the hugo documentation for this feature that there's a Truncated flag to indicate if the read-more link is necessary or not. Could you elide the link if Truncated is false? Implementation would be similar to the example given in the docs.

edit: in fact, it might make more sense to have something like this:

{{ if .Truncated }}
  <p>{{ .Summary }}</p>
  <p><a href="{{ .Permalink }}" >Read more</a></p>
{{ else }}
  {{ .Content }}
{{ end }}

so if the content is short enough that it doesn't need a summary, then it's reproduced verbatim without stripping html tags.

@@ -1,3 +1,4 @@
jekyll/**
public/**
hugout/**
*.swp
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I would prefer to exclude editor-specific cruft from gitignore files. A vim user can fix this for their own system with a user-wide gitignore or .git/info/excludes.

@tummychow
Copy link
Owner

Sorry that this slipped through the cracks. I would have reviewed it sooner but somehow github didn't notify me.

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

Successfully merging this pull request may close these issues.

2 participants