---
layout: null
---
var pages = [{% assign firstPage = "yes" %}
{% for page in site.pages %}{% if page.title and page.hide_from_sitemap != true %}{% if firstPage == "no" %},{% else %}{% assign firstPage = "no" %}{% endif %}
{
"url":{{ page.url | jsonify }},
"title":{{ page.title | jsonify }},
"description":{{ page.description | jsonify }},
"keywords":{{ page.keywords | jsonify }}
}
{% endif %}{% endfor %}
]

@@ -18,11 +18,13 @@
 ---%0A
-var
+const
  pag
@@ -33,168 +33,1221 @@
  = %5B
+%0A
 %7B%25
- assign firstPage = %22yes%22 %25%7D%0A%7B%25 for page in site.pages %25%7D%7B%25 if page.title and page.hide_from_sitemap != true %25%7D%7B%25 if firstPage == %22no%22 %25%7D,
+- for page in site.html_pages -%25%7D%0A    %7B%25- if page.hide_from_sitemap != nil or page.notoc != nil -%25%7D%0A        %7B%25- continue -%25%7D%0A    %7B%25- endif -%25%7D%0A    %7B%25- assign page_title = nil -%25%7D%0A    %7B%25- assign page_description = nil -%25%7D%0A    %7B%25- if page.title == nil and page.content and page.content contains '%3Ch1' -%25%7D%0A        %7B%25- assign a = page.content %7C split: '%3Ch1' %7C last -%25%7D%0A        %7B%25- assign b = a %7C split: '%3C/h1' %7C first -%25%7D%0A        %7B%25- assign c = b %7C split: '%3E' %7C last -%25%7D%0A        %7B%25- assign page_title = c %7C strip_html %7C strip %7C truncatewords: 10 -%25%7D%0A    %7B%25- endif -%25%7D%0A    %7B%25- if page.description == nil and page.datafile != nil and page.datafile != '' -%25%7D%0A        %7B%25- assign yaml_data = site.data%5Bpage.datafolder%5D%5Bpage.datafile%5D -%25%7D%0A        %7B%25- if yaml_data.long and yaml_data.long != '' -%25%7D%0A            %7B%25- assign page_description = page.title %7C append: ': ' %7C append: yaml_data.long %7C strip_html %7C strip %7C truncatewords: 30 -%25%7D%0A        %7B%25- elsif yaml_data.short and yaml_data.short != '' -%25%7D%0A            %7B%25- assign page_description = page.title %7C append: ': ' %7C append: yaml_data.short %7C strip_html %7C strip %7C truncatewords: 30 -%25%7D%0A        
 %7B%25
+-
  els
-e %25%7D
+if page.content and page.content != '' -%25%7D%0A            
 %7B%25
+-
  assign 
 firs
@@ -1246,29 +1246,198 @@
 ign 
-firstPage = %22no%22 
+page_description = page.content %7C strip_html %7C strip %7C truncatewords: 30 -%25%7D%0A        %7B%25- endif -%25%7D%0A    %7B%25- endif -%25%7D%0A    %7B%25- if page.title == nil and page_title == nil -%25%7D%7B%25- continue -
 %25%7D%7B%25
+-
  end
@@ -1443,17 +1443,16 @@
 dif %25%7D%0A%7B
-%0A
 %22url%22:%7B%7B
@@ -1474,17 +1474,16 @@
 nify %7D%7D,
-%0A
 %22title%22:
@@ -1497,16 +1497,38 @@
 .title %7C
+ default: page_title %7C
  jsonify
@@ -1531,17 +1531,16 @@
 nify %7D%7D,
-%0A
 %22descrip
@@ -1566,16 +1566,44 @@
 iption %7C
+ default: page_description %7C
  jsonify
@@ -1606,17 +1606,16 @@
 nify %7D%7D,
-%0A
 %22keyword
@@ -1650,24 +1650,14 @@
 y %7D%7D
-%0A
 %7D
+,
 %0A%7B%25
- endif %25%7D%7B%25
+-
  end
@@ -1663,10 +1663,12 @@
 dfor %25%7D%0A
+%7B%7D
 %5D%0A

fix missing titles and descriptions