Copyright © 2021 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl).
count/1 | Return the number of sitemap entries. |
delete_key/3 | Delete a complete source (key 'all') or a specific source key from the sitemap. |
delete_loc/2 | Delete a specific location from the sitemap. |
install/1 | |
m_get/3 | |
max_id/1 | |
rebuild_rsc/1 | Rebuild the seo sitemap for all resources. |
rebuild_rsc_task/2 | Task for fetching the seo sitemap locs for the next 1000 ids. |
slice/3 | Return a slice from the sitemap entries. |
update/2 | Insert or update a location for the sitemap. |
update_rsc/2 | Insert entries for the given resource. |
count(Context::z:context()) -> non_neg_integer()
Return the number of sitemap entries
delete_key(Source::binary(), Key::binary() | all, Context::z:context()) -> ok | {error, term()}
Delete a complete source (key 'all') or a specific source key from the sitemap.
delete_loc(Loc::binary(), Context::z:context()) -> ok | {error, term()}
Delete a specific location from the sitemap.
install(Context) -> any()
m_get(Rest, Msg, Context) -> any()
max_id(Context::z:context()) -> non_neg_integer()
rebuild_rsc(Context::z:context()) -> ok
Rebuild the seo sitemap for all resources. This needs to be done after major access control changes, on the initial install of this module or when changing the language configuration.
rebuild_rsc_task(FromId::m_rsc:resource_id(), Context::z:context()) -> ok | {delay, integer(), [m_rsc:resource_id()]}
Task for fetching the seo sitemap locs for the next 1000 ids. This task repeats till all ids are inserted into the seo_sitemap index table.
slice(Offset::pos_integer(), Limit::pos_integer(), Context::z:context()) -> {ok, [map()]} | {error, empty}
Return a slice from the sitemap entries. Note that this might give duplicate entries in sitemaps, as the ids might change during sitemap discovery and consumption by the crawler. All locations are made into absolute urls with the correct hostname. As entries are filtered on publication_end, their language and resource visibility, this might return less entries than the Limit amount requested.
update(Url::map(), Context::z:context()) -> ok | {error, term()}
Insert or update a location for the sitemap. The entry must have a key to be uniquely identified. The loc may be a path or a complete url with hostname. If the hostname is omitted then the default hostname for the site will be used. The source 'rsc' is reserved for resources (pages), suggested is to use a site or module name as source.
update_rsc(Id::m_rsc:resource_id(), Context::z:context()) -> ok | {error, term()}
Insert entries for the given resource.
Generated by EDoc