# 1.创建目录存放博客源码 >> mkdir hexo-blog # 2.初始化hexo项目 >> cd hexo-blog && hexo init # 3.安装项目依赖 >> npm install # 4.降级hexo >> npm install hexo@6.3.0 --save # 5.本地预览 >> hexo clean && hexo generate && hexo server INFO Validating config INFO Validating config INFO Start processing INFO Files loaded in 126 ms INFO Generated: archives/index.html INFO Generated: index.html INFO Generated: archives/2026/01/index.html INFO Generated: js/script.js INFO Generated: fancybox/jquery.fancybox.min.css INFO Generated: css/style.css INFO Generated: archives/2026/index.html INFO Generated: fancybox/jquery.fancybox.min.js INFO Generated: js/jquery-3.6.4.min.js INFO Generated: 2026/01/07/hello-world/index.html INFO Generated: css/images/banner.jpg INFO 11 files generated in 188 ms INFO Validating config INFO Start processing INFO Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.
# Table of Contents in the Sidebar # Front-matter variable (nonsupport wrap expand_all). toc: enable:true # Automatically add list number to toc. number:false # If true, all words will placed on next lines if header width longer then sidebar width. wrap:false # If true, all level of TOC in a post will be displayed, rather than the activated part of it. expand_all:false # Maximum heading depth of generated toc. max_depth:3