[+] Add title replacement feature
This commit is contained in:
@@ -62,6 +62,7 @@ location / {
|
|||||||
# ...
|
# ...
|
||||||
server_name your.domain.com;
|
server_name your.domain.com;
|
||||||
|
|
||||||
|
set $title "Meow Index";
|
||||||
set $dir_path /data/file-server;
|
set $dir_path /data/file-server;
|
||||||
include "/etc/nginx/MeowIndex/docs/nginx.conf";
|
include "/etc/nginx/MeowIndex/docs/nginx.conf";
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -10,6 +10,7 @@ location /__meowindex__ {
|
|||||||
sub_filter "{DEPLOY-PATH-PLACEHOLDER}" "/__meowindex__";
|
sub_filter "{DEPLOY-PATH-PLACEHOLDER}" "/__meowindex__";
|
||||||
sub_filter "{HOST-PLACEHOLDER}" "/api";
|
sub_filter "{HOST-PLACEHOLDER}" "/api";
|
||||||
sub_filter "\"/assets" "\"/__meowindex__/assets";
|
sub_filter "\"/assets" "\"/__meowindex__/assets";
|
||||||
|
sub_filter "File Listing" $title;
|
||||||
|
|
||||||
# Serve index.html on other 404 paths as well
|
# Serve index.html on other 404 paths as well
|
||||||
try_files $uri /__meowindex__/index.html;
|
try_files $uri /__meowindex__/index.html;
|
||||||
@@ -23,4 +24,4 @@ location /api {
|
|||||||
autoindex on;
|
autoindex on;
|
||||||
autoindex_format json;
|
autoindex_format json;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<title>Meow Index</title>
|
<title>File Listing</title>
|
||||||
|
|
||||||
<!-- HEAD-PLACEHOLDER -->
|
<!-- HEAD-PLACEHOLDER -->
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user