Skip to content

Commit

Permalink
fixed subdirectory support for bloglike plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLydike committed Feb 4, 2019
1 parent 5ca529f commit af0c759
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion system/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down

0 comments on commit af0c759

Please sign in to comment.