{"id":16306442,"url":"https://github.com/yanick/catalyst-plugin-sitemap","last_synced_at":"2026-03-12T14:39:19.567Z","repository":{"id":1090275,"uuid":"944120","full_name":"yanick/Catalyst-Plugin-Sitemap","owner":"yanick","description":"Add sitemap support for your Catalyst application","archived":false,"fork":false,"pushed_at":"2019-10-30T15:00:06.000Z","size":55,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"releases","last_synced_at":"2025-01-31T07:40:35.339Z","etag":null,"topics":["catalyst","perl","sitemap"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yanick.png","metadata":{"files":{"readme":"README.mkdn","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-28T00:16:13.000Z","updated_at":"2019-10-30T15:00:06.000Z","dependencies_parsed_at":"2022-07-06T06:31:55.477Z","dependency_job_id":null,"html_url":"https://github.com/yanick/Catalyst-Plugin-Sitemap","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanick%2FCatalyst-Plugin-Sitemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanick%2FCatalyst-Plugin-Sitemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanick%2FCatalyst-Plugin-Sitemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanick%2FCatalyst-Plugin-Sitemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanick","download_url":"https://codeload.github.com/yanick/Catalyst-Plugin-Sitemap/tar.gz/refs/heads/releases","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238155511,"owners_count":19425730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["catalyst","perl","sitemap"],"created_at":"2024-10-10T21:10:37.697Z","updated_at":"2026-03-12T14:39:19.505Z","avatar_url":"https://github.com/yanick.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nCatalyst::Plugin::Sitemap - Sitemap support for Catalyst.\n\n# VERSION\n\nversion 1.0.3\n\n# SYNOPSIS\n\n```perl\n# in MyApp.pm\n\nuse Catalyst qw/ Sitemap /;\n\n# in the controller\n\nsub alone :Local :Sitemap {\n    ...\n}\n\nsub with_priority :Local :Sitemap(0.75) {\n    ...\n}\n\nsub with_args :Local\n        :Sitemap( lastmod =\u003e 2010-09-27, changefreq =\u003e daily ) {\n    ...\n}\n\nsub with_function :Local :Sitemap(*) {\n    ...\n}\n\nsub with_function_sitemap {\n    $_[2]-\u003eadd( 'http://localhost/with_function' );\n}\n\n# and then...\n\nsub sitemap : Path('/sitemap') {\n    my ( $self, $c ) = @_;\n\n    $c-\u003eres-\u003ebody( $c-\u003esitemap_as_xml );\n}\n```\n\n# DESCRIPTION\n\n[Catalyst::Plugin::Sitemap](https://metacpan.org/pod/Catalyst::Plugin::Sitemap) provides a way to semi-automate the creation\nof the sitemap of a Catalyst application.\n\n# CONTEXT METHOD\n\n## sitemap()\n\nReturns a [WWW::Sitemap::XML](https://metacpan.org/pod/WWW::Sitemap::XML) object. The sitemap object is populated by\ninspecting the controllers of the application for actions with the\nsub attribute `:Sitemap`.\n\n## sitemap\\_as\\_xml()\n\nReturns the sitemap as a string containing its XML representation.\n\n# `:Sitemap` Subroutine Attribute\n\nThe sitemap is populated by actions ear-marked with the \u003c:Sitemap\u003e sub\nattribute.  It can be invoked in different ways:\n\n- `:Sitemap`\n\n    ```perl\n    sub alone :Local :Sitemap {\n        ...\n    }\n    ```\n\n    Adds the url of the action to the sitemap.\n\n    If the action does not\n    resolves in a single url, this will results in an error.\n\n- `:Sitemap($priority)`\n\n    ```perl\n    sub with_priority :Local :Sitemap(0.9) {\n        ...\n    }\n    ```\n\n    Adds the url, with the given number, which has to be between 1 (inclusive)\n    and 0 (exclusive), as its priority.\n\n    If the action does not\n    resolves in a single url, this will results in an error.\n\n- `:Sitemap( %attributes )`\n\n    ```perl\n    sub with_args :Local\n            :Sitemap( lastmod =\u003e 2010-09-27, changefreq =\u003e daily ) {\n        ...\n    }\n    ```\n\n    Adds the url with the given entry attributes (as defined by\n    [WWW::Sitemap::XML::URL](https://metacpan.org/pod/WWW::Sitemap::XML::URL)).\n\n    If the action does not\n    resolves in a single url, this will results in an error.\n\n- `:Sitemap(*)`\n\n    ```perl\n    sub with_function :Local :Sitemap(*) { }\n\n    sub with_function_sitemap {\n        my ( $self, $c, $sitemap ) = @_;\n\n        $sitemap-\u003eadd( 'http://localhost/with_function' );\n    }\n    ```\n\n    Calls the function '_action_\\_sitemap', if it exists, and passes it the\n    controller, context and sitemap objects.\n\n    This is currently the only way to invoke `:Sitemap` on an action\n    resolving to many urls.\n\n# SEE ALSO\n\n- [WWW::Sitemap::XML](https://metacpan.org/pod/WWW::Sitemap::XML)\n\n    Module that `Catalyst::Plugin::Sitemap` currently uses under the hood.\n\n- [Search::Sitemap](https://metacpan.org/pod/Search::Sitemap)\n\n    Original module that this plugin was using under the hood.\n\n- [Dancer::Plugin::SiteMap](https://metacpan.org/pod/Dancer::Plugin::SiteMap)\n\n    Similar plugin for the [Dancer](https://metacpan.org/pod/Dancer) framework, which inspired\n    `Catalyst::Plugin::Sitemap`.\n\n- [http://techblog.babyl.ca/entry/catalyst-plugin-sitemap](http://techblog.babyl.ca/entry/catalyst-plugin-sitemap)\n\n    Blog article introducing `Catalyst::Plugin::Sitemap`.\n\n# AUTHOR\n\nYanick Champoux \u003cyanick@cpan.org\u003e [![endorse](http://api.coderwall.com/yanick/endorsecount.png)](http://coderwall.com/yanick)\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2019, 2015, 2010 by Yanick Champoux.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanick%2Fcatalyst-plugin-sitemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanick%2Fcatalyst-plugin-sitemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanick%2Fcatalyst-plugin-sitemap/lists"}