安装 Hexo 后,运行以下命令在目标 <folder>
中初始化 Hexo。
¥Once Hexo is installed, run the following commands to initialize Hexo in the target <folder>
.
$ hexo init <folder> |
初始化后,你的项目文件夹将如下所示:
¥Once initialized, here’s what your project folder will look like:
. |
_config.yml
站点 configuration 文件。你可以在此处配置大多数设置。
¥Site configuration file. You can configure most settings here.
package.json
应用数据。默认情况下安装 EJS、Stylus 和 Markdown 渲染器。如果你愿意,你可以稍后卸载它们。
¥Application data. The EJS, Stylus and Markdown renderers are installed by default. If you want, you can uninstall them later.
{ |
scaffolds
Scaffold 文件夹。当你创建新帖子时,Hexo 会根据脚手架创建新文件。
¥Scaffold folder. When you create a new post, Hexo bases the new file on the scaffold.
source
源文件夹。这是你放置网站内容的地方。Hexo 会忽略隐藏文件和以 _
(下划线)为前缀的文件或文件夹 - _posts
文件夹除外。可渲染文件(例如 Markdown、HTML)将被处理并放入 public
文件夹,而其他文件将被复制。
¥Source folder. This is where you put your site’s content. Hexo ignores hidden files and files or folders whose names are prefixed with _
(underscore) - except the _posts
folder. Renderable files (e.g. Markdown, HTML) will be processed and put into the public
folder, while other files will simply be copied.
themes
主题 文件夹。Hexo 将网站内容与主题相结合,生成静态网站。
¥Theme folder. Hexo generates a static website by combining the site contents with the theme.