[+] Add title replacement feature

This commit is contained in:
Azalea Gui
2023-02-16 18:55:02 -05:00
parent 7eb7512642
commit 4ad2208c42
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -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
View File
@@ -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
View File
@@ -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 -->