Serve XML document stored as an asset

8 views
Skip to first unread message

David Sinclair

unread,
Jun 27, 2018, 8:53:15 AM6/27/18
to Hippo Community
Hi,

I am adding the ability to generate a full sitemap to our site.  We want to generate a sitemap index and a sitemap for each top level folder. So the sitemap index should look like the one here:

And the sub ones will look like:

My approach is to have a RepositoryJob generate the sitemap periodically and store it in the repository.   I have this part working ok - it is currently storing the sitemaps as assets.

However I now want to serve these assets at the appropriate url and am not sure how to achieve this.  Any tips grateful received! 

Thanks,

David

Woonsan Ko

unread,
Jun 27, 2018, 9:00:08 AM6/27/18
to hippo-c...@googlegroups.com
If it's stored in /content/assets/**, then it can be served through /site/binaries/content/assets/... already.
Now, to change the access URL, you might want to use url rewriter plugin and configure an advanced rule with 'forward' option (e.g, /site/sitemap.xml to /site/binaries/content/assets/...):

Regards,

Woonsan
 

Thanks,

David

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--

David Sinclair

unread,
Jun 27, 2018, 9:34:00 AM6/27/18
to Hippo Community
Great, thanks for the tip ...

David


On Wednesday, 27 June 2018 14:00:08 UTC+1, woonsan.ko wrote:
On Wed, Jun 27, 2018 at 8:53 AM, David Sinclair <davidlun...@gmail.com> wrote:
Hi,

I am adding the ability to generate a full sitemap to our site.  We want to generate a sitemap index and a sitemap for each top level folder. So the sitemap index should look like the one here:

And the sub ones will look like:

My approach is to have a RepositoryJob generate the sitemap periodically and store it in the repository.   I have this part working ok - it is currently storing the sitemaps as assets.

However I now want to serve these assets at the appropriate url and am not sure how to achieve this.  Any tips grateful received! 

If it's stored in /content/assets/**, then it can be served through /site/binaries/content/assets/... already.
Now, to change the access URL, you might want to use url rewriter plugin and configure an advanced rule with 'forward' option (e.g, /site/sitemap.xml to /site/binaries/content/assets/...):

Regards,

Woonsan
 

Thanks,

David

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages