* feat: start sitemap * feat: add base url and last mod to sitemap * fix: typo * test: sitemap generation * test: add draft articles * fix: escape dots in regex matching * feat: perpend protocol to the url * feat: use ChatwootApp.help_center_root * feat: don't parse the URL * fix: function declaration
9 lines
362 B
Plaintext
9 lines
362 B
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
<sitemapindex>
|
|
<% @portal.articles.where(status: :published).each do |article| %>
|
|
<sitemap>
|
|
<loc><%= @help_center_url %><%= generate_article_link(@portal.slug, article.slug, false, false) %></loc>
|
|
<lastmod><%= article.updated_at.strftime("%Y-%m-%d") %></lastmod>
|
|
</sitemap>
|
|
<% end %>
|
|
</sitemapindex> |