JuliaDocs / DemoCards.jl

Let's focus on writing demos
MIT License
66 stars 14 forks source link

Empty cards need two runs to render correctly #103

Closed BeastyBlacksmith closed 2 years ago

BeastyBlacksmith commented 2 years ago

Having a card that only has the YAML-header won't render the header info on first invocation of preview_demos.

They do appear after running the command again.

johnnychen94 commented 2 years ago

I can't reproduce this:

# ---
# title: empty file
# ---
julia> preview_demos("empty.jl"; theme="grid")
┌ Info: Detect themes in both page config file and keyword `theme`, use "grid"
│   config = "nothing"
└   keyword = "grid"
[ Info: SetupDemoCardsDirectory: setting up "preview_page" directory.
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: Redirect page URL: redirect docs-edit-link for demos in "preview_page" directory.
[ Info: Clean up DemoCards build dir: "preview_page"
"/private/var/folders/34/km3mmt5930gc4pzq1d08jvjw0000gn/T/jl_TYDYhy/build/index.html"

and I get

image