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

Having only a single page fails with a confusing error #290

Closed
onigoetz opened this issue Jan 14, 2022 · 1 comment
Closed

Having only a single page fails with a confusing error #290

onigoetz opened this issue Jan 14, 2022 · 1 comment
Labels
bug Waiting for release fixed, waiting for a release

Comments

@onigoetz
Copy link
Contributor

Describe the bug
When there is only one markdown file, the rendering of the homepage can't find the link to the "first page"
It should either fail with an error message that two pages are needed or hide the button when it's not needed

To Reproduce
Steps to reproduce the behavior:

  1. Create a docs folder with only index.md
  2. Run daux generate
Fatal error: Uncaught Error: Call to a member function getUrl() on null in /daux/libs/Format/HTML/ContentPage.php:82
Stack trace:
#0 /daux/libs/Format/Base/SimplePage.php(20): Todaymade\Daux\Format\HTML\ContentPage->generatePage()
#1 /daux/libs/Format/HTML/Generator.php(179): Todaymade\Daux\Format\Base\SimplePage->getContent()
#2 /daux/libs/Console/RunAction.php(26): Todaymade\Daux\Format\HTML\Generator->Todaymade\Daux\Format\HTML\{closure}(Object(Closure))
#3 /daux/libs/Format/HTML/Generator.php(188): Todaymade\Daux\Format\HTML\Generator->runAction('- index.html', 80, Object(Closure))

Expected behavior

Generates the documentation for that page

Desktop (please complete the following information):
irrelevant

Smartphone (please complete the following information):
irrelevant

Additional context
Add any other context about the problem here.

@onigoetz onigoetz added the bug label Jan 14, 2022
@onigoetz onigoetz added the Waiting for release fixed, waiting for a release label Jan 28, 2022
@onigoetz
Copy link
Contributor Author

Released in version 0.18.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Waiting for release fixed, waiting for a release
Projects
None yet
Development

No branches or pull requests

1 participant