Migrate from Hexo to Valaxy
迁移步骤
Migration Steps
迁移内容
Migrate Contents
Hexo 博客目录与 Valaxy 博客目录对应关系如下,将相关内容复制至对应文件夹即可。
譬如迁移文章,即将 Hexo
source/_posts
目录下内容复制至 Valaxypages/posts
目录下。
用途 | Hexo | Valaxy |
---|---|---|
文章(Markdown 文件) | source/_posts | pages/posts |
页面(Markdown / Html) | source | pages |
静态资源(*.js / *.css / CNAME etc.) | source | public |
The relationship between Hexo blog directory and Valaxy blog directory is shown in the table below. Just copy the relevant contents to the corresponding folder.
For example: To migrate articles, just copy files from Hexo’s
source/_posts
to Valaxy’spages/posts
directory.
Contents | Hexo | Valaxy |
---|---|---|
Posts (Markdown files) | source/_posts | pages/posts |
Pages (Markdown / Html files) | source | pages |
Static assets (*.js / *.css / CNAME etc.) | source | public |
迁移配置
Migrate Configurations
参考 Valaxy 配置文档 将 Hexo _config.yml
配置文件中的内容,迁移至 valaxy.config.ts
文件中。
配置示例:demo/yun/valaxy.config.ts、yunyoujun.github.io/valaxy.config.ts
valaxy.config.ts
提供了完备的类型提示,这意味着你在 VSCode 中可以直接鼠标悬浮查看各参数注释。
Refer to Valaxy Config to migrate configurations from Hexo’s _config.yml
to Valaxy’s valaxy.config.ts
.
Examples of configuration: demo/yun/valaxy.config.ts, yunyoujun.github.io/valaxy.config.ts.
valaxy.config.ts
provides a complete type prompt, which means that you can hover on configuration fields directly to view the comments in VSCode.
示例
Example
更复杂的迁移示例,您还可以对比 yunyoujun.github.io | GitHub 仓库 hexo 分支与 valaxy 的异同。
For more complex migration examples, you can also compare hexo branch and valaxy branch in yunyoujun.github.io | GitHub to see the similarities and differences.
Q.E.D.