Liking cljdoc? Tell your friends :D

sitemap.core

Library for sitemap rendering and validation.

Library for sitemap rendering and validation.
raw docstring

*extension*clj

source

chunk-sizeclj

source

default-output-path-resolverclj

Default output path resolver

Default output path resolver
sourceraw docstring

encoding-utf-8clj

source

gzipped?clj

(gzipped? path)
source

need-siteindex?clj

(need-siteindex? url-entries)
source

render-siteindexclj

(render-siteindex sitemap-paths)

Render sitemap index XML for the sitemap-paths, returned as a string.

Render sitemap index XML for the `sitemap-paths`, returned as a string.
sourceraw docstring

render-sitemapclj

(render-sitemap url-entries)

Render Clojure data structures to a String of sitemap XML.

Render Clojure data structures to a String of sitemap XML.
sourceraw docstring

render-sitemap*clj

(render-sitemap* url-entries)

Render Clojure data structures to a seq of sitemap XMLs, chunked at the maximum sitemap size (50,000).

Render Clojure data structures to a seq of sitemap XMLs, chunked at the maximum sitemap size (50,000).
sourceraw docstring

render-sitemap-and-saveclj

(render-sitemap-and-save path url-entries)

Render Clojure data structures to a string of sitemap XML and save it to file. Does not check whether the number of url-entries is greater than allowed.

Render Clojure data structures to a string of sitemap XML and save it to file. Does not
check whether the number of url-entries is greater than allowed.
sourceraw docstring

render-sitemap-and-save*clj

(render-sitemap-and-save* root-uri basename url-entries)
(render-sitemap-and-save*
  root-uri
  basename
  url-entries
  {:keys [output-path-resolver gzip?]
   :or {output-path-resolver default-output-path-resolver gzip? false}
   :as opts})

Render Clojure data structures to sitemap XML, emitting a sitemap index with sitemap chunks when the number of url-entries is greater than permitted for a single sitemap (50,000). The output file name(s) will be based on the basename.

Return sitemaps and siteindex output-path record.

Example: (render-sitemap-and-save* "https://example.com" "dir/sitemap" url-entries) will emit dir/sitemap.xml when count(url-entries) <= 50,000, otherwise will emit dir/sitemap.xml (index, pointing to https://example.com/sitemap-0.xml and so on), dir/sitemap-0.xml, dir/sitemap-1.xml, and so on.

Render Clojure data structures to sitemap XML, emitting a sitemap index with sitemap chunks
when the number of url-entries is greater than permitted for a single sitemap (50,000). The
output file name(s) will be based on the basename.

Return sitemaps and siteindex output-path record.

Example: (render-sitemap-and-save* "https://example.com" "dir/sitemap" url-entries)
will emit dir/sitemap.xml when count(url-entries) <= 50,000, otherwise will emit
dir/sitemap.xml (index, pointing to https://example.com/sitemap-0.xml and so on),
dir/sitemap-0.xml, dir/sitemap-1.xml, and so on.
sourceraw docstring

save-sitemapclj

(save-sitemap f sitemap-xml)

Save the sitemap XML to a UTF-8 encoded File.

Save the sitemap XML to a UTF-8 encoded File.
sourceraw docstring

SitemapOutputPathResolvercljprotocol

chunk-pathclj

(chunk-path _ basename i)

Returns the output path for a sitemap 'chunk' (a sub-sitemap of a sitemap index) with index i.

Returns the output path for a sitemap 'chunk' (a sub-sitemap of a sitemap index) with index i.

index-pathclj

(index-path _ basename)

Returns the output path for a sitemap or sitemap index.

Returns the output path for a sitemap or sitemap index.
source

url-entryclj

(url-entry {:keys [loc lastmod changefreq priority] :as entry})
source

urlsetclj

(urlset entries)
source

validate-sitemapclj

(validate-sitemap {:keys [:siteindex :sitemaps] :as sitemap-record})

Validate a that contains an XML sitemap against the sitemaps.org schema and return a list of validation errors. If the Sitemap is valid then the list will be empty. If the XML is structurally invalid then throws SAXParseException.

Validate a  that contains an XML sitemap
against the sitemaps.org schema and return a list of validation errors.
If the Sitemap is valid then the list will be empty. If the XML is
structurally invalid then throws SAXParseException.
sourceraw docstring

xml-declarationclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close