diff --git a/_config.yml b/_config.yml index b274dd77f867..d82d0617b18e 100644 --- a/_config.yml +++ b/_config.yml @@ -173,7 +173,7 @@ collections: output: true permalink: /projects/:path/ -news: +announcements: 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 diff --git a/_includes/news.html b/_includes/news.html index c7fefdcfb111..2146d885e5b4 100644 --- a/_includes/news.html +++ b/_includes/news.html @@ -1,13 +1,11 @@ -
{% if site.news != blank -%} {%- assign news_size = site.news | size -%} -
3 %}style="max-height: 60vw"{% endif %}> - +
3 %}style="max-height: 60vw"{% endif %}> {%- assign news = site.news | reverse -%} - {% if site.news.limit %} - {% assign news_limit = site.news.limit %} + {% if include.limit and site.announcements.limit %} + {% assign news_limit = site.announcements.limit %} {% else %} {% assign news_limit = news_size %} {% endif %} @@ -28,4 +26,4 @@ {%- else -%}

No news so far...

{%- endif %} - + \ No newline at end of file diff --git a/_layouts/about.html b/_layouts/about.html index 8954a2c57930..072ed918fbff 100644 --- a/_layouts/about.html +++ b/_layouts/about.html @@ -41,9 +41,9 @@

- {% if page.news -%} + {% if page.news and site.announcements.enabled -%}

news

- {%- include news.html %} + {%- include news.html limit=true %} {%- endif %}