Custom Post Templates

Valaxy 使用 ejs 作为模板生成助手,你可以按照以下方式定义自己的模板:

Valaxy uses ejs as its template generating helper, you can define your own templates as below:

在项目根目录中创建 scaffold 文件夹

Create a scaffold folder in your project root

$ mkdir scaffolds

在 scaffolds 文件夹中创建自己的模板

Create your own template to the scaffolds folder

提示 你要创建的文件名将与使用命令创建文件时所需的布局名称相同:

valaxy new --layout [layout] [filename]

Note The filename you are going to create is going to be the same with the layout name you need when you creating file with command:

valaxy new --layout [layout] [filename]

$ touch scaffolds/
$ cat <<EOF > scaffolds/
layout: <%=layout%>
title: <%=title%>
date: <%=date%>

Some additional descriptions

To Be Continued.