This patch fixes a bug where `Literate.markdown` with `execute=true`
would (try to) output images in the wrong directory. This only occured
when passing a relative output directory. Fixes#228.
This patch changes the generated EditURl to use a relative path (source
file relative output directory) and let Documenter figure out the remote
URL instead. This is required for Documenter version 1, but works also
on older Documenter versions.
When executing markdown (Literate.markdown(...; execute=true) images
where previously saved to files where the name was based on the hash of
the source block. This patch changes this such that files instead follow
the format {name}-{blocknumber}.(svg|png|...). Closes#204.
Automatic head branch detection (introduced in version 2.11.0) caused a
performance regression since the `git remote show` command takes ~1
second. For documentation builds with many literate files this caused
significant slowdowns, which is particularly annoying when doing
iterative buils with eg.
[LiveServer.jl](https://github.com/tlienart/LiveServer.jl). Literate now
caches the remote head branch on a per-repo basis, so the 1 second delay
should only be noticed on the first run of the first file in a repo. As
noted in the changelog entry for 2.11.0 it is also possible to specify
the head branch by passing the `edit_commit` keyword argument. Doing so
will now completely skip the slow `git` command.
This is opt-in for now, requires passing mdstrings=true.
Co-authored-by: CarloLucibello <carlo.lucibello@gmail.com>
Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
Instead of passing documenter=(true|false) to Literate.markdown
pass flavor = DocumenterFlavor() or flavor = CommonMarkFlavor()
as appropriate. For Literate.(notebook|script) it is not needed
anymore either, since removal of at-ref and at-id are now happening
unconditionally.
This implement a simple LiterateDisplay and pushes that
to the display stack when executing code to capture manual
calls to display(x) and display(mime, x), fixes#128.