Created
October 9, 2013 08:54
-
-
Save dyoder/6898322 to your computer and use it in GitHub Desktop.
Harp / Jade template for a blog summary page, automatically excepting anything before `<!-- more -->`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- function excerpt(markup) { | |
- return markup.split("<!-- more -->")[0] | |
- } | |
.blog.summary | |
ul | |
each post, slug in public.posts.data | |
li | |
h3 #{post.title} | |
p.byline | |
span.author #{post.author} | |
span.published #{post.published} | |
!= excerpt(partial("/posts/" + slug, post)) | |
p | |
a(href="/posts/" + slug) Read more… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment