This repo contains the code for the next minor (and, once properly tested, major) version of Franklin.jl. The code has basically been re-written from scratch, and your help is needed to uncover bugs and problems.
Most of what's offered by Franklin is also offered by Xranklin (apart from what's listed in this issue which we should make as precise as possible).
Link to the new docs (under active construction, note that the search won't work, and I'm also aware that the nav does not work well on mobile phone).
Assumptions:
\n
, this is only a concern for you if you're on Windows but if you use a modern editor, it should be the default or easy to set)Here's a suggested workflow:
Xranklin
to your environment with Pkg.add(url="https://github.com/tlienart/Xranklin.jl", rev="main");
cd
to the repo and do using Xranklin; serve(debug=true)
, this will generate a lot of output,prepath
in config.md
.github/workflows/deploy.yml
to the script belowPages
consume gh-pages
)Link to the new docs, the docs are being built so expect rough edges but if you find things that can be added or explained better, please open issues. Don't worry too much about layout issues for now.
Changes:
@def x = ...
to +++ ... +++
blocks (see docs), @def
will still work but will not allow multi-line assignments, generally +++...+++
are preferred now@delay
is removed (it's not required anymore)lxfuns
now take arguments as hfuns
(a list of parameters corresponding to the braces) see this exampleenvfuns
now take arguments differently, see this exampleDates
is not available by default, you have to explicitly add using Dates
in your utils.jl
or in your +++...+++
blocks in order to be able to call things like Date(2022,2,1)
This has not yet been migrated and so you shouldn't expect it to work (see also this issue)
It helps to use ignore = ...
in your config.md
to avoid trying to build your full site
at once which will be very helpful in gradually debugging things. For instance you may have
something like
ignore = ["posts/", "about/", "foo/bar.md"]
to indicate that the directories posts/
and about/
as well as the file foo/bar.md
should be ignored.
Now that there's a __cache
folder generated alongside the __site
folder, add it to your
.gitignore
file so it doesn't get pushed.
So it will look something like this:
__site/
__cache/
.DS_Store # if you're on macos
lx_fun
now take args as hfuns
so lx_foo(p::Vector{String})
@def
do not accept multiline assignments anymore, generally prefer +++...+++
blocks\n
and not \r\n
) (LF Assumption)Notes
FranklinParser
to have a token for \r\n
, and update things with occurrences
of \n
(including the process_line_return
function). Potentially having an editor with \r\n
will not make things fail (since we'll capture the \n
) but it's not tested.brew install stork-search/stork-tap/stork
# brew info stork
JS lib:
<script src="https://files.stork-search.net/releases/v1.6.0/stork.js"></script>