From 9676578b5ba9cf8ae5797e149e4720863483401f Mon Sep 17 00:00:00 2001 From: Anton McClure Date: Wed, 26 Jan 2022 11:03:57 -0500 Subject: [PATCH] Fixes for @tomasino's requested changes --- entries/index.php | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) 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

- + draft" ?>

-

author:

-

date:

-
- -

Originally published at .

+

author:

+

date:


+ +

Originally published at .

+
@@ -61,11 +69,22 @@ if (file_exists($filename)) {

journal entries