diff --git a/entries/index.php b/entries/index.php index 0f5c82a..b91f50e 100644 --- a/entries/index.php +++ b/entries/index.php @@ -20,9 +20,17 @@ if (file_exists($filename)) { $yml = $document->getYAML(); $content = $document->getContent(); $title = $yml["title"] ?? "invalid"; - $author_name = htmlspecialchars($yml["author-name"]); - $author_link = htmlspecialchars($yml["author-link"]); - $original_link = htmlspecialchars($yml["original"]); + $date = htmlspecialchars($yml["date"]); + $author_name = htmlspecialchars($yml["author_name"]); + if (isset($yml["author_link"])) { + $author_link = htmlspecialchars($yml["author_link"]); + $author = "$author_name"; + } else { + $author = $author_name; + } + if (isset($yml["original_link"])): + $original_link = htmlspecialchars($yml["original_link"]); + endif; $description = "journal entry {$entry_name}: {$yml["title"]} by {$author}"; include __DIR__."/../header.php"; @@ -31,16 +39,16 @@ if (file_exists($filename)) { < back to list
author: =$author_name?>
-date: =$yml["date"]?>
-Originally published at =$original_link?>.
+author: =$author?>
+date: =$date?>
Originally published at =$original_link?>.
+