-
-
Save jorgepedret/6904673 to your computer and use it in GitHub Desktop.
Harp blog excerpt example
This file contains 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