From 87a14e062456e569f66f0925fc94ad5ffa0186b8 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Thu, 4 Jan 2024 16:03:02 +0100 Subject: [PATCH] feat: missing tweaks for feed writing --- www/.htaccess | 4 +++- www/composer.json | 3 ++- www/post_adapter.php | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/www/.htaccess b/www/.htaccess index 3ceba7d..d624f34 100644 --- a/www/.htaccess +++ b/www/.htaccess @@ -1,5 +1,7 @@ AddType text/plain .md +AddType text/plain .atom +AddType text/plain .rss php_value upload_max_filesize 40M php_value post_max_size 42M @@ -7,7 +9,7 @@ php_value post_max_size 42M RewriteEngine On RewriteBase / -RewriteCond %{REQUEST_URI} !^/?(static|raw)/.* +RewriteCond %{REQUEST_URI} !^/?(static|raw|robots\.txt).* RewriteRule (.*) router.php Allow from all diff --git a/www/composer.json b/www/composer.json index 752d618..eb01954 100644 --- a/www/composer.json +++ b/www/composer.json @@ -3,6 +3,7 @@ "twig/twig": "^3.0", "twig/markdown-extra": "^3.6", "league/commonmark": "^2.4", - "spatie/yaml-front-matter": "^2.0" + "spatie/yaml-front-matter": "^2.0", + "laminas/laminas-feed": "^2.6" } } diff --git a/www/post_adapter.php b/www/post_adapter.php index a7e3561..860179c 100644 --- a/www/post_adapter.php +++ b/www/post_adapter.php @@ -3,6 +3,7 @@ require_once 'mysql_adapter.php'; use Spatie\YamlFrontMatter\YamlFrontMatter; +use Laminas\Feed\Writer\Feed; class PostHandler extends MySQLAdapter { public $data_directory;