{ "version": "https://jsonfeed.org/version/1", "title": "Hito的公告栏", "subtitle": "天下事有难易乎?为之,则难者亦易矣", "icon": "https://blog.jingxiyuan.cn/images/favicon.ico", "description": "hito的博客", "home_page_url": "https://blog.jingxiyuan.cn", "items": [ { "id": "https://blog.jingxiyuan.cn/2022/09/16/chevereto%E5%9B%BE%E5%BA%8A%E5%AE%89%E8%A3%85/", "url": "https://blog.jingxiyuan.cn/2022/09/16/chevereto%E5%9B%BE%E5%BA%8A%E5%AE%89%E8%A3%85/", "title": "极空间chevereto图床docker版安装", "date_published": "2022-09-16T00:04:55.000Z", "content_html": "
需要先安装好 mysql 数据库
\n选择版本,1.5 版支持中文,之后被维护的团队删除只支持英文
\n本文介绍使用的是 linuxserver_chevereto 的镜像
\n需要预先创建好给 chevereto 使用的库、账户、密码
\n映射路径(不要放在高速盘,否则会有权限问题)
\n
端口
\n
环境(puid 和 pgid 使用 1000,不要使用 0,否则会报错)
\n
使用 http:// 极空间 ip:81 (端口号使用上面配置的,我配置的是 81) 进行 web 访问(数据库配置)
\n
管理员配置(注意 website 配置选择个人,除非需要提供给其它人注册)
\n
\n
默认上传大小是 2M,可通过修改 php.ini 配置提升(路径 /etc/php7/php.ini 查找 upload_max_filesize 进行修改)。之后用管理员登录通过页面 http://xxx/dashboard/settings/image-upload 修改。
\n安装 nodejs
\n安装 git
\n安装 hexo(windows 需进入 git bash)
\nnpm install -g hexo-cli
初始化博客目录
\nhexo init blog
进入博客目录
\ncd blog
初始化 hexo 到博客目录
\nnpm install
下载主题
\ngit clone
https://github.com/amehime/hexo-theme-shoka.git ./themes/shoka
卸载 hexo-renderer-marked 以及别的 markdown 文件渲染器
\nnpm un hexo-renderer-marked --save
安装(md 文件渲染器,压缩 css/js/html)
\nnpm i hexo-renderer-multi-markdown-it --save
安装(给生成的 css 文件们添加浏览器前缀)
\nnpm i hexo-autoprefixer --save
安装(站内搜索功能)
\nnpm i hexo-algoliasearch --save
安装(文章或站点字数及阅读时间统计)
\nnpm i hexo-symbols-count-time --save
安装(生成 Feed 文件)
\nnpm i hexo-feed --save
清除静态文件
\nhexo clean
生成静态文件
\nhexo g
安装 git 推送插件
\nnpm install hexo-deployer-git --save
推送静态文件到 git
\nhexo d
npm install hexo-admin --save
hexo-admin 编辑 url
\n\nsettings 设置用户名、密码、Secret
\n\n把底部生成的配置拷入 hexo 配合文件中 (_config.yml)
\nadmin: | |
username: username | |
password_hash: xxxxxx | |
secret: 'my super secret phrase' #用单引号包裹 | |
deployCommand: 'hexo_publish.sh' #windows 用 hexo_publish.bat,linux 用 hexo_publish.sh |
#!/bin/bash | |
hexo clean | |
hexo g | |
hexo d |
@echo off | |
cd D:\\blog | |
d: | |
@cmd /c \"hexo clean&& hexo g&&hexo d&&echo success\" |
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
\n$ hexo new \"My New Post\" |
More info: Writing
\n$ hexo server |
More info: Server
\n$ hexo generate |
More info: Generating
\n$ hexo deploy |
More info: Deployment
\n", "tags": [] } ] }