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
This commit is contained in:
Shivam Mishra
2024-04-26 21:36:39 +05:30
committed by GitHub
parent d88d0bdd80
commit 78f94511ff
5 changed files with 48 additions and 1 deletions

View File

@@ -393,6 +393,7 @@ Rails.application.routes.draw do
end
get 'hc/:slug', to: 'public/api/v1/portals#show'
get 'hc/:slug/sitemap.xml', to: 'public/api/v1/portals#sitemap'
get 'hc/:slug/:locale', to: 'public/api/v1/portals#show'
get 'hc/:slug/:locale/articles', to: 'public/api/v1/portals/articles#index'
get 'hc/:slug/:locale/categories', to: 'public/api/v1/portals/categories#index'