From af0c7590c66afb3319a6764d7e8d8b8b6f1a986b Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Mon, 4 Feb 2019 16:33:52 +0100 Subject: [PATCH] fixed subdirectory support for bloglike plugin --- Dockerfile | 8 +++++++- system/plugins.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b16b468..5d55bbe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,13 @@ RUN chmod +x /root/start-script.sh EXPOSE 80 -COPY . /var/www/html +# uncomment for subdirectory testing +# RUN mkdir /var/www/html/subdir/ +# COPY . /var/www/html/subdir + +COPY . /var/www/html/ + + RUN chown -R www-data:www-data /var/www/html/ CMD /root/start-script.sh diff --git a/system/plugins.php b/system/plugins.php index 437de22..e2f56c0 100644 --- a/system/plugins.php +++ b/system/plugins.php @@ -51,7 +51,7 @@ function define_plugin($name, $methods) { // article := a list entry of the blogposts // get the article layout, or use default one - $article_layout = isset($config['layout']) ? $config['layout'] : "## #{{index}}: [{{title}}]({{url}})\n*Written on the {{date}}*\n\n{{preview}} [more]({{url}})"; + $article_layout = isset($config['layout']) ? $config['layout'] : "## #{{index}}: [{{title}}]({{root}}{{url}})\n*Written on the {{date}}*\n\n{{preview}} [more]({{root}}{{url}})"; // save all generated articles, so we can sort them $articles = [];