diff --git a/_config.yml b/_config.yml
index 809caeeffee2..752bb23c85db 100644
--- a/_config.yml
+++ b/_config.yml
@@ -173,8 +173,15 @@ collections:
output: true
permalink: /projects/:path/
-news_scrollable: true # adds a vertical scroll bar if there are more than 3 news items
-news_limit: 5 # leave blank to include all the news in the `_news` folder
+news:
+ enabled: true
+ scrollable: true # adds a vertical scroll bar if there are more than 3 news items
+ limit: 5 # leave blank to include all the news in the `_news` folder
+
+latest_posts:
+ enabled: true
+ scrollable: true # adds a vertical scroll bar if there are more than 3 new posts items
+ limit: 3 # leave blank to include all the blog posts
# -----------------------------------------------------------------------------
# Jekyll settings
diff --git a/_includes/latest_posts.html b/_includes/latest_posts.html
new file mode 100644
index 000000000000..c9fb643c9d07
--- /dev/null
+++ b/_includes/latest_posts.html
@@ -0,0 +1,26 @@
+
+
+ {% if site.latest_posts != blank -%}
+ {%- assign latest_posts_size = site.posts | size -%}
+
3 %}style="max-height: 10vw"{% endif %}>
+
+ {%- assign latest_posts = site.posts -%}
+ {% if site.latest_posts.limit %}
+ {% assign latest_posts_limit = site.latest_posts.limit %}
+ {% else %}
+ {% assign latest_posts_limit = latest_posts_size %}
+ {% endif %}
+ {% for item in latest_posts limit: latest_posts_limit %}
+
+ {{ item.date | date: "%b %-d, %Y" }} |
+
+ {{ item.title }}
+ |
+
+ {%- endfor %}
+
+
+ {%- else -%}
+
No posts so far...
+ {%- endif %}
+
diff --git a/_includes/news.html b/_includes/news.html
index 14d286daa7f2..963485d89caa 100644
--- a/_includes/news.html
+++ b/_includes/news.html
@@ -1,30 +1,30 @@
-
+
- {% if site.news != blank -%}
+ {% if site.news != blank -%}
{%- assign news_size = site.news | size -%}
-
3 %}style="max-height: 10vw"{% endif %}>
+
3 %}style="max-height: 10vw"{% endif %}>
{%- assign news = site.news | reverse -%}
- {% if site.news_limit %}
- {% assign news_limit = site.news_limit %}
+ {% if site.news.limit %}
+ {% assign news_limit = site.news.limit %}
{% else %}
{% assign news_limit = news_size %}
{% endif %}
- {% for item in news limit: news_limit %}
+ {% for item in news limit: news_limit %}
{{ item.date | date: "%b %-d, %Y" }} |
- {% if item.inline -%}
+ {% if item.inline -%}
{{ item.content | remove: ' ' | remove: ' ' | emojify }}
- {%- else -%}
+ {%- else -%}
{{ item.title }}
- {%- endif %}
+ {%- endif %}
|
- {%- endfor %}
+ {%- endfor %}
- {%- else -%}
+ {%- else -%}
No news so far...
- {%- endif %}
+ {%- endif %}
diff --git a/_layouts/about.html b/_layouts/about.html
index ab6674a90083..8954a2c57930 100644
--- a/_layouts/about.html
+++ b/_layouts/about.html
@@ -23,8 +23,8 @@
{%- assign profile_image_class = "img-fluid z-depth-1 rounded" -%}
{% endif %}
- {% include figure.html
- path=profile_image_path
+ {% include figure.html
+ path=profile_image_path
class=profile_image_class
alt=page.profile.image -%}
{% endif -%}
@@ -46,6 +46,12 @@
+ {% if page.latest_posts -%}
+
+ {%- include latest_posts.html %}
+ {%- endif %}
+
{% if page.selected_papers -%}
@@ -62,7 +68,7 @@
{%- endif %}
diff --git a/_pages/about.md b/_pages/about.md
index 4126a800f937..e0407f2c30e6 100644
--- a/_pages/about.md
+++ b/_pages/about.md
@@ -11,6 +11,7 @@ profile:
address:
news: false # includes a list of news items
+latest_posts: true # includes a list of the newest posts
selected_papers: true # includes a list of papers marked as "selected={true}"
social: true # includes social icons at the bottom of the page
---