-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsitemap.xml
More file actions
62 lines (56 loc) · 2.43 KB
/
sitemap.xml
File metadata and controls
62 lines (56 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
layout: null
regenerate: true
---
<?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">
{%- assign pages = site.html_pages | where_exp:'doc','doc.sitemap != false' | where_exp:'doc','doc.url != "/Hide_Tree_Page.html"' -%}
{%- if site.docFullPath contains 'web-twain/docs' -%}
{%- assign pages = site.documents | where_exp:'doc','doc.sitemap != false' | where_exp:'doc','doc.url != "/Hide_Tree_Page.html"' -%}
{%- endif -%}
{%- for page in pages -%}
{%- assign excludeFlag = false -%}
{%- if page.url contains '-v' -%}
{%- assign candidateVersionStr = page.url | split: '-v' -%}
{%- for tmpStr in candidateVersionStr offset:1 -%}
{%- assign tmpVer = tmpStr | split: '/' | first | replace: '.html', '' | strip -%}
{%- capture firstChar -%}
{{ tmpVer | truncate: 4 | replace:"...", "" }}
{%- endcapture -%}
{%- if firstChar >= "0" and firstChar <= "9" -%}
{%- assign excludeFlag = true -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- if page.ignore -%}
{%- assign excludeFlag = true -%}
{%- endif -%}
{%- if page.path contains 'programming-old/' -%}
{%- assign excludeFlag = true -%}
{%- endif -%}
{%- if site.docFullPath contains 'license-server/docs' and page.url contains 'schedule/stable' -%}
{%- assign excludeFlag = true -%}
{%- endif -%}
{%- if site.docFullPath contains 'web-twain/docs' and page.url contains 'indepth/faqs/develop' -%}
{%- assign excludeFlag = true -%}
{%- endif -%}
{%- if site.docFullPath contains 'barcode-reader/docs' and page.url contains '/faq/' -%}
{%- assign excludeFlag = true -%}
{%- endif -%}
{%- if page.url contains 'search.html' or page.url contains 'search-test.html' -%}
{%- assign excludeFlag = true -%}
{%- endif -%}
{%- assign docFullPath = site.docFullPath -%}
{%- assign docFullPathLastChar = docFullPath | split:'' | last -%}
{%- if docFullPathLastChar contains '/' -%}
{%- assign truncateDocHomePageSize = docFullPath | size | minus:1 -%}
{%- assign docFullPath = docFullPath | slice: 0, truncateDocHomePageSize -%}
{%- endif -%}
{%- unless excludeFlag or page.layout == "" or page.layout == "default" -%}
<url>
<loc>{{ docFullPath }}{{page.url | replace:'/index.html','/' | xml_escape}}</loc>
</url>
{%- endunless -%}
{%- endfor -%}
</urlset>