diff --git a/Project.toml b/Project.toml index 46e5ac438..270b7d74e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Franklin" uuid = "713c75ef-9fc9-4b05-94a9-213340da978e" authors = ["Thibaut Lienart "] -version = "0.10.89" +version = "0.10.90" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/src/manager/robots_generator.jl b/src/manager/robots_generator.jl index cbdc49a08..12f027408 100644 --- a/src/manager/robots_generator.jl +++ b/src/manager/robots_generator.jl @@ -26,8 +26,9 @@ function robots_generator() dst = joinpath(path(:site), "robots.txt") isfile(dst) && rm(dst) io = IOBuffer() + sitemap_file = splitext(globvar(:sitemap_file))[1] * ".xml" globvar(:generate_sitemap)::Bool && println(io, """ - Sitemap: $(joinpath(globvar(:website_url)::String, "sitemap.xml")) + Sitemap: $(joinpath(globvar(:website_url)::String, sitemap_file)) """) print(io, """ User-agent: * diff --git a/src/manager/sitemap_generator.jl b/src/manager/sitemap_generator.jl index 275ea90bb..a11f7e4f2 100644 --- a/src/manager/sitemap_generator.jl +++ b/src/manager/sitemap_generator.jl @@ -67,7 +67,8 @@ $SIGNATURES Generate a `sitemap.xml`, if one already exists, it will be replaced. """ function sitemap_generator() - dst = joinpath(path(:site), "sitemap.xml") + sitemap_file = splitext(globvar(:sitemap_file))[1] * ".xml" + dst = joinpath(path(:site), sitemap_file) isfile(dst) && rm(dst) io = IOBuffer() println(io, """ diff --git a/src/utils/vars.jl b/src/utils/vars.jl index 44c5f37a0..0bd67f6d8 100644 --- a/src/utils/vars.jl +++ b/src/utils/vars.jl @@ -47,6 +47,7 @@ const GLOBAL_VARS_DEFAULT = [ "rss_full_content" => dpair(false), # Sitemap "generate_sitemap" => dpair(true), + "sitemap_file" => dpair("sitemap"), # div names "content_tag" => dpair("div"), "content_class" => dpair("franklin-content"), @@ -82,6 +83,8 @@ const GLOBAL_VARS_ALIASES = LittleDict( "rss_website_url" => "website_url", "rss_website_descr" => "website_description", "website_descr" => "website_description", + "rss_filename" => "rss_file", + "sitemap_filename" => "sitemap_file", ) """