Skip to content

Commit

Permalink
Fixes #354
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz committed Dec 9, 2022
1 parent 1b1436d commit 9a8f8bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/Format/HTML/ContentPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function generatePage()
'filename' => $this->file->getName(),
'language' => $this->language,
'path' => $this->file->getPath(),
'relative_path' => $this->file->getRelativePath(),
'relative_path' => $this->file->getPath() ? $this->file->getRelativePath() : null,
'modified_time' => $this->file->getPath() ? filemtime($this->file->getPath()) : null,
'markdown' => $this->content,
'request' => $config->getRequest(),
Expand Down
2 changes: 1 addition & 1 deletion templates/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<?php } ?>
<?php
$edit_on = $config->getHTML()->getEditOn();
if ($edit_on) { ?>
if ($edit_on && $page['relative_path']) { ?>
<span class="EditOn">
<a href="<?= $edit_on['basepath'] ?>/<?= $page['relative_path'] ?>" target="_blank">
<?= str_replace(":name:", $edit_on['name'], $this->translate("Edit_on")) ?>
Expand Down

0 comments on commit 9a8f8bc

Please sign in to comment.