From c116d9e59a2a65bdc04df5c903f238c9444d1009 Mon Sep 17 00:00:00 2001 From: filesite Date: Tue, 24 May 2022 10:12:53 +0800 Subject: [PATCH] readme update --- README.md | 59 +++++++++++++++++++++++++++++++ conf/app.php | 2 +- conf/template_googleimage.php | 2 +- conf/template_manual.php | 2 +- conf/template_webdirectory.php | 2 +- www/content/README.md | 5 +++ www/content/Theme_GoogleImage.md | 8 +++++ www/content/Theme_Manual.md | 8 +++++ www/content/Theme_WebDirectory.md | 9 +++++ 9 files changed, 93 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 48b69f1..381bd90 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,62 @@ Source code of filesite.io. Filesite.io也一样,它短小精悍,使用它把常见的本地文件制作成网站,就像拿起砍刀一样简单, 所以我们将filesite.io的**源码**命名为```machete```。 + + +## Docker使用 + +从dockerhub下载镜像: + +``` +docker pull filesite/machete +``` + + +启动machete容器: + +``` +docker run --name machete -p 1080:80 -itd filesite/machete [皮肤名] +``` + +其中皮肤名称可选值: + +``` +[ + 'manual', //文档网站 + 'webdirectory', //导航网站 + 'googleimage' //图片网站 +] +``` + +本地监听端口``1080``请根据自己需要修改。 + + +machete在容器中的目录: + +``` +/var/www/machete/ +``` + +可根据自己的需要,通过``-v``参数映射本地内容目录到容器目录, +示例如下: +``` +docker run --name machete -p 1080:80 \ + -v /mine/content/:/var/www/machete/www/content/ \ + -itd filesite/machete \ + manual +``` + +这样可以通过更新本地内容目录的文件来实时更新网站内容。 + + +查看容器: + +``` +docker ps +``` + +如果看到名字为``machete``的容器正在运行,说明容器启动完成,访问本地网址测试: + +``` +http://127.0.0.1:1080 +``` \ No newline at end of file diff --git a/conf/app.php b/conf/app.php index c017313..9225cb9 100644 --- a/conf/app.php +++ b/conf/app.php @@ -15,7 +15,7 @@ return array( 'theme' => 'webdirectory', //图片站皮肤 - //'content_directory' => 'dogs/', //directory of contents in /www/ + //'content_directory' => 'girls/', //directory of contents in /www/ //'theme' => 'googleimage', //name of theme which is enabled 'default_layout' => 'main', //default layout diff --git a/conf/template_googleimage.php b/conf/template_googleimage.php index 91d1fe1..468c452 100644 --- a/conf/template_googleimage.php +++ b/conf/template_googleimage.php @@ -15,7 +15,7 @@ return array( //'theme' => 'webdirectory', //图片站皮肤 - 'content_directory' => 'dogs/', //directory of contents in /www/ + 'content_directory' => 'girls/', //directory of contents in /www/ 'theme' => 'googleimage', //name of theme which is enabled 'default_layout' => 'main', //default layout diff --git a/conf/template_manual.php b/conf/template_manual.php index 248470b..ac20b43 100644 --- a/conf/template_manual.php +++ b/conf/template_manual.php @@ -15,7 +15,7 @@ return array( //'theme' => 'webdirectory', //图片站皮肤 - //'content_directory' => 'dogs/', //directory of contents in /www/ + //'content_directory' => 'girls/', //directory of contents in /www/ //'theme' => 'googleimage', //name of theme which is enabled 'default_layout' => 'main', //default layout diff --git a/conf/template_webdirectory.php b/conf/template_webdirectory.php index ac47c22..26c3c9c 100644 --- a/conf/template_webdirectory.php +++ b/conf/template_webdirectory.php @@ -15,7 +15,7 @@ return array( 'theme' => 'webdirectory', //图片站皮肤 - //'content_directory' => 'dogs/', //directory of contents in /www/ + //'content_directory' => 'girls/', //directory of contents in /www/ //'theme' => 'googleimage', //name of theme which is enabled 'default_layout' => 'main', //default layout diff --git a/www/content/README.md b/www/content/README.md index 662dca3..d960ba0 100644 --- a/www/content/README.md +++ b/www/content/README.md @@ -105,6 +105,11 @@ git clone https://git.filesite.io/filesite/machete.git https://git.filesite.io/filesite/machete/archive/master.zip ``` +* 从dockerhub下载镜像: +``` +docker pull filesite/machete +``` + ## 皮肤下载 diff --git a/www/content/Theme_GoogleImage.md b/www/content/Theme_GoogleImage.md index a185f32..eb06472 100644 --- a/www/content/Theme_GoogleImage.md +++ b/www/content/Theme_GoogleImage.md @@ -12,3 +12,11 @@ * 图片下方展示标题,标题不换行,超出部分自动隐藏 * 顶部展示一行分类,可左右滑动以展示更多分类 * 顶部展示网站名称、logo及介绍内容,介绍内容以悬浮菜单方式展示 + + +## conf/app.php配置 + +``` +'content_directory' => 'girls/', //内容存放目录 +'theme' => 'googleimage', //皮肤名称 +``` \ No newline at end of file diff --git a/www/content/Theme_Manual.md b/www/content/Theme_Manual.md index 66dfa98..0788c21 100644 --- a/www/content/Theme_Manual.md +++ b/www/content/Theme_Manual.md @@ -8,3 +8,11 @@ * Markdown解析后展示类似Github * 自动解析Markdown中的标题作目录 * 自适应PC和手机 + + +## conf/app.php配置 + +``` +'content_directory' => 'content/', //内容存放目录 +'theme' => 'manual', //皮肤名称 +``` \ No newline at end of file diff --git a/www/content/Theme_WebDirectory.md b/www/content/Theme_WebDirectory.md index 4d29336..fff2a78 100644 --- a/www/content/Theme_WebDirectory.md +++ b/www/content/Theme_WebDirectory.md @@ -9,3 +9,12 @@ * 支持根目录下用Readme_sort.txt描述文件指定一级目录排序 * 支持根目录下用Readme_contact.txt描述文件指定“联系我”内容 * 自适应PC和手机 + + + +## conf/app.php配置 + +``` +'content_directory' => 'navs/', //内容存放目录 +'theme' => 'webdirectory', //皮肤名称 +``` \ No newline at end of file