npm install -g picanhajs
mkdir yourpath
cd yourpath
picanha beginbbq
cd yourpath
picanha grill
OR
cd yourpath
picanha
You can also generate your build on developer mode this way:
cd yourpath
picanha grill dev
Here will be your posts / contents. As other static generators, they will be written in markdown.
Everything you put on frontmatter will be available as variable on templates.
You can have as much templates as you want. Each template will be in a folder in this directory.
Sure you can make your own template also.
You have to configure in your picanha.json
which template is gonna be used
This folder will be generated. You can just copy its contents to your server and this your site is working.
Put your configuration in this file. Place this file in your project's root.
Name of the folder where build html will be created.
default: "./_build"
Name of the path where posts will be found.
default: "./_posts"
Format of the 'date' attribute you will provide on frontmatter of posts.
default: "DD/MM/YYYY"
Friendly url to be generated for each posts.
Variables available: year, month, day, name
default: ":year/:month/:day/:name/"
Name of the file generated for each post.
default: "index.html"
Name of the path where choosen template will be found
default: "./_templates/default_theme/"
Name of file that will be rendered as your home page
default: "home.html"
Name of folder where your template's partials will be found
default: "partials"
List of folders used to store your template's static files
default: ["css", "js", "img"]
List of folders used to store your template's static files
default: ["css", "js", "img"]
List of layouts you will use in your frontmatter. You must have html files in your template with this names.
default: ["post", "page"]
Everything you set here will be available on your template.
reserved word:
- omitfilename [bool]: this will ommit the name of the file on url of posts
- dev [object]: properties setted in this object will be available when grill command is executed in dev mode.
- prod [object]: properties setted in this object will be available when grill command is executed in non-dev mode.
default: {}
List of sizes used for get authors avatar
default: { "xsmall" : 40, "small" : 60, "medium" : 100, "large" : 150, "xlarge" : 200 }
List of authors. Every information about each one will be available on template.
default: [ { "name" : "PicanhaLabs", "email" : "[email protected]", "github" : "https://github.com/PicanhaLabs" } ]
{
"dist" : "./_build/",
"posts" : {
"dateformat": "DD/MM/YYYY",
"dist" : {
"path" : ":year/:month/:day/:name/",
"name" : "index.html"
},
"source" : "./_posts"
},
"template" : {
"path" : "./_templates/default_theme/",
"home" : "home.html",
"partials" : "partials",
"static" : ["css", "js", "img"],
"layouts" : ["post", "page"],
"globals" : {}
},
"defaultAuthorSizes" : {
"xsmall" : 40,
"small" : 60,
"medium" : 100,
"large" : 150,
"xlarge" : 200
},
"authors" : [
{
"name" : "PicanhaLabs",
"email" : "[email protected]",
"github" : "https://github.com/PicanhaLabs"
}
]
}