From b75ef577b16fdcdbf8563281a7d3c3ca54f001e7 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 9 Sep 2019 20:36:41 -0400 Subject: [PATCH] mv entry.php entries/index.php --- README.md | 2 +- entry.php => entries/index.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) rename entry.php => entries/index.php (83%) diff --git a/README.md b/README.md index 383fabc..a947400 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Currently hosted at [journal.tildeverse.org](https://journal.tildeverse.org/). this site requires an nginx rewrite to properly server entries: location ~* ^/entries/(.+)$ { - try_files $uri $uri/ /entry.php?slug=$1; + try_files $uri $uri/ /entries/$1; include snippets/php.conf; } diff --git a/entry.php b/entries/index.php similarity index 83% rename from entry.php rename to entries/index.php index 3115fe5..3b52e96 100644 --- a/entry.php +++ b/entries/index.php @@ -1,5 +1,5 @@ parse(file_get_contents($filename)); @@ -21,7 +21,7 @@ if (file_exists($filename)) { $author = htmlspecialchars($yml["author"]); $description = "journal entry {$entry_name}: {$yml["title"]} by {$author}"; - include "header.php"; + include __DIR__."/../header.php"; ?> < back to list @@ -41,9 +41,9 @@ if (file_exists($filename)) { } else { $title="journal entries"; $description="a list of tildeverse journal entries."; - include "header.php"; + include __DIR__."/../header.php"; - foreach (glob("entries/*.md") as $entry) { + foreach (glob("*.md") as $entry) { $entries[] = [ "slug" => basename($entry, ".md"), "yml" => $parser->parse(file_get_contents($entry))->getYAML(), @@ -55,7 +55,7 @@ if (file_exists($filename)) {
  • - "> + "> by
  • @@ -63,5 +63,5 @@ if (file_exists($filename)) { +include __DIR__."/../footer.php"; ?>