Nginx autoindex 的前端,用于美化显示 autoindex 页面。
- 目录显示
- README.md 文件显示
location / {
# 设置目录
root /var/download;
# 开启 autoindex
autoindex on;
# 设置 autoindex 返回信息为 json
autoindex_format "json";
}
在本地克隆当前项目
git clone https://github.com/mayushans/mys_autoindex.gitcd mys_autoindex
npm installnpm run build将 dist 目录中的文件部署到前端目录即可。
修改网站根目录 config.json 文件
site_name 为网站标题显示
api 为 autoindex 服务的地址,务必以“/”结尾
{
"site_name": "MYS DOWNLOAD",
"base_url": "/file/",
}