mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Important: Fixed sitemap template.
This commit is contained in:
26
sitemap.xml
26
sitemap.xml
@@ -1,5 +1,6 @@
|
||||
---
|
||||
layout: compress
|
||||
#
|
||||
# The Sitemap template
|
||||
# © 2017-2019 Cotes Chung
|
||||
# MIT License
|
||||
@@ -41,7 +42,30 @@ layout: compress
|
||||
|
||||
{% for page in site.pages %}
|
||||
|
||||
{% if site.sitemap_exclude contains page.url %}
|
||||
{% assign pass = false %}
|
||||
|
||||
{% for fuzzy in site.sitemap_exclude.fuzzy %}
|
||||
{% if page.url contains fuzzy %}
|
||||
{% assign pass = true %}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% unless pass %}
|
||||
{% for accurate in site.sitemap_exclude.accurate %}
|
||||
{% assign len = accurate | size %}
|
||||
{% capture beg %}{{ 0 | minus: len }}{% endcapture %}
|
||||
{% capture tail %}{{ page.url | slice: beg, len }}{% endcapture %}
|
||||
|
||||
{% if tail == accurate %}
|
||||
{% assign pass = true %}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endunless %}
|
||||
|
||||
{% if pass %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user