module Sitemapper
Included Modules
- Habitat::SettingsHelpers
- Habitat::TempConfig
Defined in:
sitemapper.crsitemapper/builder.cr
sitemapper/errors.cr
sitemapper/image_map.cr
sitemapper/paginator.cr
sitemapper/ping_bot.cr
sitemapper/storage.cr
sitemapper/storage/aws_storage.cr
sitemapper/storage/local_storage.cr
sitemapper/streamer.cr
sitemapper/video_map.cr
Constant Summary
-
HABITAT_SETTINGS =
[{decl: use_index : Bool = false, example: nil, validation: nil}, {decl: host : String, example: "https://mysite.com", validation: nil}, {decl: sitemap_host : String | ::Nil = nil, example: nil, validation: nil}, {decl: sitemap_file_name : String = Sitemapper::Builder::DEFAULT_SITEMAP_FILENAME, example: nil, validation: nil}, {decl: index_file_name : String = Sitemapper::Builder::DEFAULT_INDEX_FILENAME, example: nil, validation: nil}, {decl: max_urls : Int32 = 500, example: nil, validation: nil}, {decl: storage : Sitemapper::Storage.class = Sitemapper::LocalStorage, example: nil, validation: nil}, {decl: compress : Bool = true, example: nil, validation: nil}, {decl: storage_path : String = "tmp/sitemaps", example: nil, validation: nil}, {decl: aws_config : AwsStorageConfig | ::Nil = nil, example: nil, validation: nil}] of Nil -
VERSION =
{{ (`shards version /srv/crystaldoc.info/github-jwoertink-sitemapper-v0.10.0/src`).chomp.stringify }}
Class Method Summary
-
.build(host : String = config.host, max_urls : Int32 = config.max_urls, use_index : Bool = config.use_index, &) : Array(Hash(String, String))
Build your sitemaps.
- .config
- .configure(&)
-
.ping_search_engines(sitemap_url : String, **additional_engines) : Nil
DEPRECATED The
pingno longer works. See each search engine for their proper methods of submitting sitemaps - .settings
-
.store(sitemaps : Array(Hash(String, String)), path : String) : Nil
Store your sitemap xml files.
-
.stored_file_name(file_name : String) : String
The name a sitemap is actually stored under, which picks up the
.gzextension whenconfig.compressis set. -
.stream(host : String = config.host, max_urls : Int32 = config.max_urls, use_index : Bool = config.use_index, storage : Sitemapper::Storage.class = config.storage, storage_path : String = config.storage_path, &) : Array(String)
Build your sitemaps, streaming each file.
Instance Method Summary
Class Method Detail
Build your sitemaps. The block arg is an instance of Sitemapper::Builder.
Args default to the configuration, but can be overriden.
Sitemapper.build(max_urls: 20) do |builder|
builder.add("/").add("/about")
end
DEPRECATED The ping no longer works. See each search engine for their proper methods of submitting sitemaps
Store your sitemap xml files.
Set the storage config option to the class
of the storage.
The name a sitemap is actually stored under, which picks up the
.gz extension when config.compress is set.
Build your sitemaps, streaming each file. The block arg is an instance of Sitemapper::Streamer.
Each sitemap is saved to your configured storage as it fills up, then the
sitemap_index.xml is saved last. Returns the filenames that were saved.
Args default to the configuration, but can be overriden.
Sitemapper.stream(path: "tmp/sitemaps") do |builder|
builder.add("/").add("/about")
end