Skip to content

Commit

Permalink
ud sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Bouysset committed Apr 23, 2020
1 parent e373be5 commit d09db33
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 0 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ defaults:
author: GCCR
permalink: /news/:year/:month/:day/:title
type: NewsArticle
sitemap: false
- scope:
path: ""
type: "surveys"
Expand Down
1 change: 1 addition & 0 deletions _posts/2020-04-07-covid19-survey.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
author: cbouysset
title: Our COVID-19 survey is now online
published: false
---

Welcome to our brand new news section !
Expand Down
14 changes: 14 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ sitemap: false
{% endunless %}
{% endfor %}

{% for survey in site.surveys %}
<url>
<loc>{{ site.url }}{{ survey.url }}</loc>
{% if survey.sitemap.lastmod %}
<lastmod>{{ survey.sitemap.lastmod | date: "%Y-%m-%d" }}</lastmod>
{% elsif survey.date %}
<lastmod>{{ survey.date | date_to_xmlschema }}</lastmod>
{% else %}
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
{% endif %}
<priority>0.6</priority>
</url>
{% endfor %}

{% assign pages = site.html_pages | where_exp:'doc','doc.sitemap != false' | where_exp:'doc','doc.url != "/404.html"' %}
{% for page in pages %}
<url>
Expand Down
2 changes: 1 addition & 1 deletion surveys/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
---

<!-- Survey box -->
Expand Down

0 comments on commit d09db33

Please sign in to comment.