OSDN Git Service

add System.static_dir config vars
authorhylom <hylom@users.sourceforge.jp>
Mon, 6 Aug 2018 09:33:35 +0000 (18:33 +0900)
committerhylom <hylom@users.sourceforge.jp>
Mon, 6 Aug 2018 09:33:35 +0000 (18:33 +0900)
src/newslash_web/lib/Newslash/Web.pm

index 839ae55..6457b0e 100644 (file)
@@ -63,6 +63,13 @@ sub startup {
         }
     }
 
+    # add static contents directories
+    if ($app->config->{System} && $app->config->{System}->{static_dir}) {
+        for my $dir (@{$app->config->{System}->{static_dir}}) {
+            push @{$app->static->paths}, $dir;
+        }
+    }
+
     ############################################################
     #
     # Plugin Settings