From d09db339d334a7c890a92fbc02385084e03d8a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bouysset?= Date: Thu, 23 Apr 2020 15:05:43 +0200 Subject: [PATCH] ud sitemap --- _config.yml | 1 - _posts/2020-04-07-covid19-survey.md | 1 + sitemap.xml | 14 ++++++++++++++ surveys/index.html | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index 9057204c1..95c936dce 100644 --- a/_config.yml +++ b/_config.yml @@ -13,7 +13,6 @@ defaults: author: GCCR permalink: /news/:year/:month/:day/:title type: NewsArticle - sitemap: false - scope: path: "" type: "surveys" diff --git a/_posts/2020-04-07-covid19-survey.md b/_posts/2020-04-07-covid19-survey.md index 04a14d89e..a3ac20b6c 100644 --- a/_posts/2020-04-07-covid19-survey.md +++ b/_posts/2020-04-07-covid19-survey.md @@ -1,6 +1,7 @@ --- author: cbouysset title: Our COVID-19 survey is now online +published: false --- Welcome to our brand new news section ! diff --git a/sitemap.xml b/sitemap.xml index 908fb67fd..f2275966d 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -47,6 +47,20 @@ sitemap: false {% endunless %} {% endfor %} + {% for survey in site.surveys %} + + {{ site.url }}{{ survey.url }} + {% if survey.sitemap.lastmod %} + {{ survey.sitemap.lastmod | date: "%Y-%m-%d" }} + {% elsif survey.date %} + {{ survey.date | date_to_xmlschema }} + {% else %} + {{ site.time | date_to_xmlschema }} + {% endif %} + 0.6 + + {% endfor %} + {% assign pages = site.html_pages | where_exp:'doc','doc.sitemap != false' | where_exp:'doc','doc.url != "/404.html"' %} {% for page in pages %} diff --git a/surveys/index.html b/surveys/index.html index e4a5871c9..ea361e39a 100644 --- a/surveys/index.html +++ b/surveys/index.html @@ -3,7 +3,7 @@ description: Participate in the GCCR study on respiratory illness (e.g COVID-19, influenza, flu) and their effect on taste and smell ! layout: survey-base sitemap: - priority: 0.8 + priority: 0.9 ---