Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an error early in HTMLWriter when there are no pages #1491

Merged
merged 5 commits into from
Dec 9, 2020

Conversation

mortenpi
Copy link
Member

@mortenpi mortenpi commented Dec 7, 2020

The UndefRefError in #1201 happens when you do not have any pages (i.e. any .md files under src/). Then menu at

menu = navitem(NavMenuContext(ctx, navnode))
push!(menu.attributes, :class => "docs-menu")

will be a Node("") with uninitialized fields. It doesn't really make sense to build anything if there are no pages, so we'll try to bail early with a more helpful message in that situation.

Having an index.md is not actually necessary for a build to complete, but the docs do end up slightly broken if you don't have it, so we'll also print a warning if src/index.md is missing.

@mortenpi mortenpi added this to the 0.26.0 milestone Dec 7, 2020
@mortenpi mortenpi merged commit 371f331 into master Dec 9, 2020
@mortenpi mortenpi deleted the mp/html-no-pages branch December 9, 2020 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant