2025-2-26-fixed
This commit is contained in:
45
themes/fluid/source/xml/local-search.xml
Normal file
45
themes/fluid/source/xml/local-search.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<search>
|
||||
{% if posts %}
|
||||
{% for post in posts.toArray() %}
|
||||
{% if post.indexing == undefined or post.indexing %}
|
||||
<entry>
|
||||
<title>{{ post.title }}</title>
|
||||
<link href="{{ [url, post.path] | urlJoin | uriencode }}"/>
|
||||
<url>{{ [url, post.path] | urlJoin | uriencode }}</url>
|
||||
{% if content %}
|
||||
<content type="html"><![CDATA[{{ post.content | noControlChars | safe }}]]></content>
|
||||
{% endif %}
|
||||
{% if post.categories and post.categories.length>0 %}
|
||||
<categories>
|
||||
{% for cate in post.categories.toArray() %}
|
||||
<category>{{ cate.name }}</category>
|
||||
{% endfor %}
|
||||
</categories>
|
||||
{% endif %}
|
||||
{% if post.tags and post.tags.length>0 %}
|
||||
<tags>
|
||||
{% for tag in post.tags.toArray() %}
|
||||
<tag>{{ tag.name }}</tag>
|
||||
{% endfor %}
|
||||
</tags>
|
||||
{% endif %}
|
||||
</entry>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if pages %}
|
||||
{% for page in pages.toArray() %}
|
||||
{% if post.indexing == undefined or post.indexing %}
|
||||
<entry>
|
||||
<title>{{ page.title }}</title>
|
||||
<link href="{{ [url, post.path] | urlJoin | uriencode }}"/>
|
||||
<url>{{ [url, post.path] | urlJoin | uriencode }}</url>
|
||||
{% if content %}
|
||||
<content type="html"><![CDATA[{{ page.content | noControlChars | safe }}]]></content>
|
||||
{% endif %}
|
||||
</entry>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</search>
|
||||
Reference in New Issue
Block a user