Skip to content

Commit

Permalink
default author to empty + ensure rss is not read only
Browse files Browse the repository at this point in the history
  • Loading branch information
tlienart committed Sep 3, 2021
1 parent 32ac6c6 commit 5bffa35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/manager/rss_generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ function prepare_for_rss()::Nothing
"templates", "common", "_rss", template
)
cp(src, dst)
# ensure the file is not read-only
chmod(dst, 0o644)
end
end
return nothing
Expand Down
2 changes: 1 addition & 1 deletion src/utils/vars.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const GLOBAL_VARS = PageVars()

const GLOBAL_VARS_DEFAULT = [
# General
"author" => Pair("THE AUTHOR", (String, Nothing)),
"author" => Pair("", (String, Nothing)),
"prepath" => dpair(""),
"date_format" => dpair("U dd, yyyy"),
"date_days" => dpair(String[]),
Expand Down
6 changes: 3 additions & 3 deletions test/parser/md-dbb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ end
Franklin.eval(:(hfun_bar(p) = string(round(sqrt(Meta.parse(p[1])), digits=1)) ))
s = "@@B @@A {{author}} @@\n@@ <!-- html -->\n" |> fd2html
@test isapproxstr(s, """
<div class=\"B\"><div class=\"A\">THE AUTHOR</div></div>
<div class=\"B\"><div class=\"A\"></div></div>
""")
s = "**{{author}}**" |> fd2html
@test isapproxstr(s, "<p><strong>THE AUTHOR</strong></p>")
@test isapproxstr(s, "<p><strong></strong></p>")
s = raw"\style{font-weight:bold;}{ {{author}} }" |> fd2html
@test isapproxstr(s, """
<span style="font-weight:bold;">THE AUTHOR</span>
<span style="font-weight:bold;"></span>
""")
s = raw"@@bold {{bar 4}} @@" |> fd2html
@test isapproxstr(s, """
Expand Down

0 comments on commit 5bffa35

Please sign in to comment.