P
P
pcdesign2013-07-02 09:15:57
Perl
pcdesign, 2013-07-02 09:15:57

Sitemap.xml for mojolicious framework

Tell me, plz, is there any module or convenient tool in mojolicious for creating Sitemap.xml?

Dancer has this module:

Dancer::Plugin::SiteMap

I couldn't find anything similar in mojo.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan, 2013-07-02
@pcdesign

The plugin for Dancer is not very fair as it doesn't handle patterned routes.
Mojolicious also provides a list of routes (see cpansearch.perl.org/src/SRI/Mojolicious-4.16/lib/Mojolicious/Command/routes.pm ) and writes a similar plugin.
But it is better to write a "private" generator that takes into account all the pages of the site.
Or a separate controller (bad option with a lot of content).
Or as a custom command Mojolicious::Command::* and run by cron to generate a static file.
Or as a hook that will work on adding content and generate a static file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question