Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sitemap for help center (#9280)
* 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
- Loading branch information
Showing
5 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters