Skip to content

Commit

Permalink
feat(sitemap): hide posts with hidden attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Aug 24, 2015
1 parent 554d3ba commit a81046b
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions _app/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
<priority>1.0</priority>
</url>

{% for post in site.posts %}
<url>
<loc>{{ post.url | prepend: site.base | prepend: site.url }}</loc>
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
{% endfor %}
</urlset>
{% for post in site.posts %}
{% if post.hidden != true %}
<url>
<loc>{{ post.url | prepend: site.base | prepend: site.url }}</loc>
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
{% endif %}
{% endfor %}
</urlset>

0 comments on commit a81046b

Please sign in to comment.