+
+ {{ post.title }}
+ +
+ {{ post.body | excerpt | string | striptags() | truncate(100) }}
+
+ diff --git a/content/contents.lr b/content/contents.lr index 16540d00c..608653616 100644 --- a/content/contents.lr +++ b/content/contents.lr @@ -70,5 +70,7 @@ links_plugins:
Thank you for your interest in contributing to Creative Commons open source projects!
- -We do all of our development [on GitHub](https://github.com/creativecommons/). If you are not familiar with GitHub or pull requests, [here is an excellent guide to get started](https://guides.github.com/activities/hello-world/). ## Finding an issue diff --git a/flowblocks/recent-posts.ini b/flowblocks/recent-posts.ini new file mode 100644 index 000000000..76d77851d --- /dev/null +++ b/flowblocks/recent-posts.ini @@ -0,0 +1,6 @@ +[block] +name = Recent Posts + +[fields.title] +label = Title +type = string \ No newline at end of file diff --git a/models/blog.ini b/models/blog.ini index 5c66499f3..c2520e949 100644 --- a/models/blog.ini +++ b/models/blog.ini @@ -19,4 +19,4 @@ order_by = -pub_date, title [pagination] enabled = yes -per_page = 10 +per_page = 12 diff --git a/models/home.ini b/models/home.ini index ecab21ffa..0863f30ed 100644 --- a/models/home.ini +++ b/models/home.ini @@ -9,4 +9,4 @@ type = string [fields.block_content] label = Block Content type = flow -flow_blocks = hero, get-involved, featured-projects +flow_blocks = hero, get-involved, recent-posts, featured-projects diff --git a/models/page.ini b/models/page.ini index dcddfe824..fdfffb92d 100644 --- a/models/page.ini +++ b/models/page.ini @@ -6,6 +6,10 @@ label = {{ this.title }} label = Title type = string +[fields.description] +label = Title +type = markdown + [fields.body] label = Body type = markdown diff --git a/themes/vocabulary_theme/templates/blocks/recent-posts.html b/themes/vocabulary_theme/templates/blocks/recent-posts.html new file mode 100644 index 000000000..ca39939dc --- /dev/null +++ b/themes/vocabulary_theme/templates/blocks/recent-posts.html @@ -0,0 +1,43 @@ +{% from "macros/author_name.html" import render_author_name %} + +by {{ render_author_name(author) }} - on {{ post.pub_date|dateformat("YYYY-MM-dd") }}
-