You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks so much for this amazing JS. I can't quite get it to work with my blog though as I'm using {{ post.excerpt }} on my homepage rather than {{ post.content }}. I also call a few different classes on my homepage. For example, on my posts the title is an H1 but on my homepage I have {{ post.title}} set to an H2.
Is there an easy way to make this work without printing the fill post?
thanks in advance.
nate
The text was updated successfully, but these errors were encountered:
@natelandau I can't figure out a way for posts to have multiple layouts with Jekyll, so it seems like this may be difficult right now. One alternative is to with CSS hide everything that's not the first paragraph, when a post is displayed on the front page, e.g.:
.blog-posts> .post>p+p {
display: none;
}
It's on my to-do list to rewrite Infinite Jekyll to use the built-in pagination feature though, which would make this use case super easy to implement, so I'll leave this issue open.
Another possible (and better) CSS solution in the meantime is to include both the excerpt and the post in every post, which you can hide and display depending on the context:
/* Default to always hiding the excerpt */
.post> .post-excerpt {
display: none;
}
/* Hide the full post on the front page */
.blog-posts> .post> .post-full {
display: none;
}
/* Display the excerpt on the front page */
.blog-posts> .post> .post-excerpt {
display: block;
}
Thanks so much for this amazing JS. I can't quite get it to work with my blog though as I'm using
{{ post.excerpt }}
on my homepage rather than{{ post.content }}
. I also call a few different classes on my homepage. For example, on my posts the title is an H1 but on my homepage I have{{ post.title}}
set to an H2.Is there an easy way to make this work without printing the fill post?
thanks in advance.
nate
The text was updated successfully, but these errors were encountered: