基于Hexo和云服务器的个人博客搭建
本地环境本地Hexo环境搭建1234567891011121314# 安装 Node.js(版本需≥14)# 官网下载:https://nodejs.org (选LTS版本)# 安装 git# 安装 Hexo npm install -g hexo-cli# 创建博客文件夹并初始化hexo init my-blog# 进入文件夹 安装 npmcd my-blognpm install # 安装依赖包 测试123# 测试本地预览(访问 http://localhost:4000)hexo g # 生成静态文件(public文件夹)hexo server 服务器环境准备服务器环境(Ubuntu)12345678910# 登录你的服务器(通过SSH)ssh root@你的服务器IP# 安装必要软件,git 和 nginxsudo apt updatesudo apt install git nginx -y# 创建网站目录并设置权限sudo mkdir -p /var/www/hexosudo chown -R $USER:$USER /var/www/hexo 配置Git12...
Hello World
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. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment


