diff --git a/lib/Blog.php b/lib/Blog.php
index d189495..f9cbd74 100644
--- a/lib/Blog.php
+++ b/lib/Blog.php
@@ -3,6 +3,7 @@
final class Blog
{
+ private array $own_links = [];
private array $links = [];
public function __construct()
@@ -18,6 +19,11 @@ final class Blog
private function loadConfig()
{
require_once "config.php";
+ foreach ($own_links as $title => $url) {
+ $this->own_links[] = new Link($title, $url);
+ }
+ $this->own_links[] = new Link("RSS feed", BLOG_LINK . "/rss.php");
+ $this->own_links[] = new Link("Atom feed", BLOG_LINK . "/atom.php");
foreach ($links as $title => $url) {
$this->links[] = new Link($title, $url);
}
@@ -47,7 +53,8 @@ final class Blog
return [
"title" => BLOG_TITLE,
"has_sub_title" => BLOG_SUB_TITLE !== "",
- "sub_title" => BLOG_SUB_TITLE
+ "sub_title" => BLOG_SUB_TITLE,
+ "blog_link" => BLOG_LINK
];
}
@@ -80,6 +87,7 @@ final class Blog
return [
"author" => AUTHOR_NICKNAME,
"bio" => AUTHOR_BIOGRAPHY,
+ "own_links" => $this->own_links
];
}
diff --git a/lib/Feed.php b/lib/Feed.php
index b31de98..d9c266d 100644
--- a/lib/Feed.php
+++ b/lib/Feed.php
@@ -26,7 +26,7 @@ final class Feed
private function render()
{
- header("Content-Type: application/" . $this->type . "+xml");
+ header("Content-Type: application/xml");
$file = self::BASE_PATH . $this->type . ".xml";
$latest = self::BASE_PATH . "latest";
if (!is_file($file) or filemtime($file) < filemtime($latest)) {
diff --git a/views/bio.phtml b/views/bio.phtml
index 3117918..d4f08c5 100644
--- a/views/bio.phtml
+++ b/views/bio.phtml
@@ -3,5 +3,10 @@
=$bio?>
diff --git a/views/header.phtml b/views/header.phtml index 1f9cc0e..a8044b6 100644 --- a/views/header.phtml +++ b/views/header.phtml @@ -1,5 +1,5 @@