-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set rollup to true in a post front matter to include it the the recent publications section in the home page. The last 3 most recent posts with this value set will get displayed there. The optional category field can be set and will be displayed above the post. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
- Loading branch information
Showing
7 changed files
with
90 additions
and
158 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<!-- This example requires Tailwind CSS v2.0+ --> | ||
<div class="bg-white pt-16 pb-20 px-4 sm:px-6 lg:pt-24 lg:pb-28 lg:px-8"> | ||
<div | ||
class="relative max-w-lg mx-auto divide-y-2 divide-gray-200 lg:max-w-7xl" | ||
> | ||
<div> | ||
<h2 | ||
class="text-3xl tracking-tight font-extrabold text-gray-900 sm:text-4xl" | ||
> | ||
Recent publications | ||
</h2> | ||
<p class="mt-3 text-xl text-gray-500 sm:mt-4"> | ||
Read tutorials, watch videos and catch up on new features from the | ||
inlets community. | ||
</p> | ||
</div> | ||
|
||
<div | ||
class="mt-12 mb-5 grid gap-16 pt-12 lg:grid-cols-3 lg:gap-x-5 lg:gap-y-12" | ||
> | ||
{% assign rollup_posts = site.posts | where_exp: "post", "post.rollup == true" | sort: 'date' | reverse | slice: 0, 3 %} | ||
{% if rollup_posts.size > 0 %} | ||
{% for post in rollup_posts %} | ||
<div> | ||
{% if post.category %} | ||
<div> | ||
<div class="inline-block"> | ||
<span | ||
class="inline-flex items-center px-3 py-0.5 rounded-full text-sm font-medium bg-pink-100 text-pink-800" | ||
> | ||
{{ post.category | capitalize_first }} | ||
</span> | ||
</div> | ||
</div> | ||
{% endif %} | ||
<a href="{{ site.base_url }}{{ post.url }}" class="block mt-4"> | ||
<p class="text-xl font-semibold text-gray-900">{{ post.title }}</p> | ||
<p class="mt-3 text-base text-gray-500">{{ post.description }}</p> | ||
</a> | ||
<div class="mt-6 flex items-center"> | ||
{% if post.author %} | ||
<div class="flex-shrink-0"> | ||
<img | ||
class="h-10 w-10 rounded-full" | ||
src="/images/{{ post.author_img }}.jpg" | ||
alt="{{ post.author }}" | ||
alt="" | ||
/> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="ml-3"> | ||
<p class="text-sm font-medium text-gray-900">{{ post.author }}</p> | ||
<div class="flex space-x-1 text-sm text-gray-500"> | ||
<time datetime="2020-03-16"> {{ post.date | date: "%B %e, %Y" }} </time> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
|
||
<div class="pt-5 text-sm"> | ||
<a | ||
href="/blog/" | ||
class="font-medium text-indigo-600 hover:text-indigo-500" | ||
> | ||
Read more on the blog <span aria-hidden="true">→</span></a | ||
> | ||
</div> | ||
</div> | ||
</div> |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Jekyll | ||
module CapitalizeFilter | ||
def capitalize_first(input) | ||
input.capitalize | ||
end | ||
end | ||
end | ||
|
||
Liquid::Template.register_filter(Jekyll::CapitalizeFilter) | ||
|
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
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
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
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