Giter Site home page Giter Site logo

ft-so-simple's People

Contributors

thecedarprince avatar tlienart avatar

Stargazers

 avatar

ft-so-simple's Issues

Empty Collection Error with {{blog_calendar}}

Hey @tlienart,

I am having some very strange behavior with the fork suddenly that I did not have before. For some reason, the function, {{blog_calendar}} in blog/index.md causes Franklin. Here is the snippet:

+++
title="Blog Archive"
# remove hasmath if no description has math in it
hasmath=true
+++


{{blog_calendar}}

{{blog_calendar_list}}

The stacktrace:

→ Initial full pass...
┌ Franklin Warning: in <index.md>
│ Encountered an issue processing 'index.md' in ts/ft-so-simple/blog.
│ Verify, then re-start the Franklin server.
│ The error is displayed below:
│ ArgumentError("reducing over an empty collection is not allowed")
└
ERROR: ArgumentError: reducing over an empty collection is not allowed
Stacktrace:
 [1] process_file(::Symbol, ::Pair{String,String}, ::String, ::Vararg{Any,N} where N) at /h
ome/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/file_utils.jl:72
 [2] fd_fullpass(::NamedTuple{(:other, :infra, :md, :html, :literate),NTuple{5,Dict{Pair{St
ring,String},Float64}}}) at /home/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/fr
anklin.jl:239
 [3] serve(; clear::Bool, verb::Bool, port::Int64, single::Bool, prerender::Bool, nomess::B
ool, is_final_pass::Bool, no_fail_prerender::Bool, eval_all::Bool, silent::Bool, cleanup::B
ool, on_write::Franklin.var"#221#224", log::Bool, host::String, show_warnings::Bool, launch
::Bool) at /home/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/franklin.jl:118
 [4] serve() at /home/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/franklin.jl:66
 [5] top-level scope at REPL[12]:1
caused by [exception 1]
ArgumentError: reducing over an empty collection is not allowed
Stacktrace:
 [1] _empty_reduce_error() at ./reduce.jl:299
 [2] mapreduce_empty(::Function, ::Base.BottomRF{typeof(Base.add_sum)}, ::Type{T} where T)
at ./reduce.jl:342
 [3] reduce_empty(::Base.MappingRF{Main.Utils.var"#3#4"{Dict{Any,Any},String},Base.BottomRF
{typeof(Base.add_sum)}}, ::Type{Any}) at ./reduce.jl:329
 [4] reduce_empty_iter at ./reduce.jl:355 [inlined]
 [5] reduce_empty_iter at ./reduce.jl:354 [inlined]
 [6] foldl_impl at ./reduce.jl:49 [inlined]
 [7] mapfoldl_impl at ./reduce.jl:44 [inlined]
 [8] #mapfoldl#204 at ./reduce.jl:160 [inlined]
 [9] mapfoldl at ./reduce.jl:160 [inlined]
 [10] #mapreduce#208 at ./reduce.jl:287 [inlined]
 [11] mapreduce at ./reduce.jl:287 [inlined]
 [12] sum at ./reduce.jl:494 [inlined]
 [13] sum(::Base.Generator{Base.KeySet{Any,Dict{Any,Any}},Main.Utils.var"#3#4"{Dict{Any,Any
},String}}) at ./reduce.jl:511
 [14] hfun_blog_calendar() at /home/src/Projects/ft-so-simple/utils.jl:39
 [15] top-level scope at none:1
 [16] eval at ./boot.jl:331 [inlined]
 [17] convert_html_fblock(::Franklin.HFun) at /home/cedarprince/.julia/packages/Franklin/bu
5tC/src/converter/html/functions.jl:14
 [18] process_html_qblocks(::String, ::Array{Franklin.AbstractBlock,1}, ::Int64, ::Int64) a
t /home/cedarprince/.julia/packages/Franklin/bu5tC/src/converter/html/html.jl:121
 [19] process_html_qblocks(::String, ::Array{Franklin.AbstractBlock,1}) at /home/cedarprinc
e/.julia/packages/Franklin/bu5tC/src/converter/html/html.jl:101
 [20] convert_html(::String) at /home/cedarprince/.julia/packages/Franklin/bu5tC/src/conver
ter/html/html.jl:22
 [21] map at ./tuple.jl:159 [inlined]
 [22] map at ./tuple.jl:160 [inlined]
 [23] write_page(::String, ::String; head::String, pgfoot::String, foot::String) at /home/c
edarprince/.julia/packages/Franklin/bu5tC/src/manager/write_page.jl:96
 [24] convert_and_write(::String, ::String, ::String, ::String, ::String, ::String) at /hom
e/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/write_page.jl:198
 [25] process_file_err(::Symbol, ::Pair{String,String}, ::String, ::String, ::String, ::Flo
at64) at /home/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/file_utils.jl:97
 [26] process_file(::Symbol, ::Pair{String,String}, ::String, ::Vararg{Any,N} where N) at /
home/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/file_utils.jl:59
 [27] fd_fullpass(::NamedTuple{(:other, :infra, :md, :html, :literate),NTuple{5,Dict{Pair{S
tring,String},Float64}}}) at /home/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/f
ranklin.jl:239
 [28] serve(; clear::Bool, verb::Bool, port::Int64, single::Bool, prerender::Bool, nomess::
Bool, is_final_pass::Bool, no_fail_prerender::Bool, eval_all::Bool, silent::Bool, cleanup::
Bool, on_write::Franklin.var"#221#224", log::Bool, host::String, show_warnings::Bool, launc
h::Bool) at /home/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/franklin.jl:118
 [29] serve() at /home/cedarprince/.julia/packages/Franklin/bu5tC/src/manager/franklin.jl:
6
 [30] top-level scope at REPL[12]:1

The best work around I found right now is to instead use this snippet inside blog/index.md but it does not show all my blogs at the moment:

+++
title="Blog Archive"
+++

{{blog_calendar_list}}

I was not having this issue the other day so I am curious if something changed with Franklin during an update I made to my packages. Any thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.