Build the rows of datasets/sitemap.xml from the record
Source: R/sitemap.R
build_datasets_sitemap.RdBuild the rows of datasets/sitemap.xml from the record
Usage
build_datasets_sitemap(
record,
observed = NULL,
edited = NULL,
include_holdings = TRUE,
changefreq = "weekly"
)Arguments
- record
datasets.json: a path/URL or the parsed list- observed
the tibble from
read_distribution_observed(), or NULL — itsupdated/observed_utcdate is an external record'slastmod, and a row observedretiredis dropped even when the registry still calls it current- edited
a named character vector
dataset_key -> ISO dateof the descriptive sidecars' last edit; a page'slastmodis the later of that and the release date- include_holdings
list the holdings' pages too (default TRUE — a holding has a page at the same URL shape, plan § D-11)
- changefreq
the
changefreqwritten for every URL
Value
A tibble: loc, lastmod, changefreq, kind
(page + portal = "calcofi.io" for a dataset page, else the
distribution's own kind and portal),
dataset_key, portal, title. Pages first, in record order, then the
external records; every loc unique.