Hexo 博客搭建与使用详细教程一、Hexo 简介Hexo 是一个基于 Node.js 的静态博客框架,支持 Markdown 语法,能快速生成静态页面并部署到 GitHub Pages、Vercel 等平台。优势包括:
快速生成页面
丰富的主题和插件
支持 Markdown
易于部署
二、安装前准备1. 安装 Node.js1.1 访问 Node.js 官网 下载 LTS 版本1.2 Linux安装
123456789101112# 1. 安装 curl 工具(如未安装)sudo apt-get install -y curl # Ubuntu/Debiansudo yum install -y curl # CentOS/RHELsudo dnf install -y curl # Fedora# 2. 自动选择适合的安装脚本(LTS版本)curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -# 3. 执行安装sudo apt-get install -y nodejs # U ...
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
Github Actions使用方法1 GitHub Actions 的基本概念
在 GitHub Actions 中,工作流(workflow)由多个任务(job)组成,每个任务包含一系列步骤(step)。核心概念如下:
Workflow(工作流):定义自动化流程的 YAML 配置文件,存放在 .github/workflows/ 目录下。
Job(任务):一个完整的执行单元,可以包含多个步骤。
Step(步骤):任务中的具体执行操作,比如拉取代码、安装依赖、运行脚本等。
Runner(运行器):执行 GitHub Actions 任务的服务器,分为 GitHub 提供的托管 runner 和自托管 runner。
Event(触发事件):定义何时运行工作流,例如 push、pull_request、schedule(定时任务)等。
2 解释工作流文件件存在于你的仓库.github/workflows目录下的*.yml
2.1 示例代码123456789101112131415161718192021222324252627name: CI ...














