Add /data/search-index.json
This commit is contained in:
parent
9da29c6a65
commit
26071b3a7d
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
layout: blank
|
||||
type: other
|
||||
---
|
||||
{% assign pages = site.pages
|
||||
| where_exp: "page", 'page.type == "article"'
|
||||
%}[
|
||||
{% for page in pages
|
||||
%}{% if forloop.index0 != 0 %},{% endif %}{
|
||||
"id": {{ page.url | replace: ".html", "" | slice: 1, 9999 | jsonify }},
|
||||
"title": {{ page.title | jsonify }},
|
||||
"url": {{ page.url | replace: ".html", "" | jsonify }},
|
||||
"category": {{ page.category | jsonify }},
|
||||
"keywords": {{ page.keywords | jsonify }},
|
||||
"content_html": {{ page.content | markdownify | strip | jsonify }},
|
||||
"intro_html": {{ page.intro | markdownify | strip | jsonify }},
|
||||
"description_html": {{ page.description | markdownify | strip | jsonify }},
|
||||
"tags": {{ page.tags | jsonify }},
|
||||
"updated": {{ page.updated | jsonify }}
|
||||
}{% endfor %}
|
||||
]
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
layout: blank
|
||||
type: other
|
||||
---
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
|
|
Loading…
Reference in New Issue