Branch
Hash :
ae614143
Author :
Thomas de Grivel
Date :
2025-09-03T12:11:09
fix test/httpd dump and optimize doc_index and sitemap
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
## kc3
## Copyright from 2022 to 2025 kmx.io <contact@kmx.io>
##
## Permission is hereby granted to use this software granted the above
## copyright notice and this permission paragraph are included in all
## copies and substantial portions of this software.
##
## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
## THIS SOFTWARE.
require EKC3
defmodule SitemapView do
def template =
EKC3.load("app/templates/sitemap/sitemap.xml.ekc3")
def template_doc =
EKC3.load("app/templates/sitemap/sitemap_doc.xml.ekc3")
def template_page =
EKC3.load("app/templates/sitemap/sitemap_page.xml.ekc3")
def render_doc = fn (url) { EKC3.render(SitemapView.template_doc) }
def render_page = fn (url) { EKC3.render(SitemapView.template_page) }
def render = fn (prefix_url, doc_index, page_index) {
doc_index = List.join(List.map(doc_index,
SitemapView.render_doc), "\n")
page_index = List.join(List.map(page_index,
SitemapView.render_page), "\n")
EKC3.render(SitemapView.template)
}
end