-
Notifications
You must be signed in to change notification settings - Fork 107
Generating a Site
Running the command, punch generate
(or punch g
) will prepare the full-site in output
directory by rendering all pages and copying assets.
If you're using punch publish
command to publish your site, it will automatically generate the site before publishing.
By default, Punch will not generate the existing files (in output
directory), if they are not modified. However, if you want to force a full generation, run the generate command with --blank
option.
punch g --blank
You can set this option from the configuration (config.json
) as well.
"generator" : {
"blank" : true
}
Sometimes, you may need to exclude certain paths from generation. For example, if you are using LESS's import
feature, you may not want to compile the individual LESS files to CSS. On such instances, you can instruct Punch to skip those paths from generation.
"generator" : {
"skip_paths" : [
"/assets/less*",
"/*.psd"
]
}
Note, that you can use regular expressions to match the paths.
You can also specify hooks to run after generating each file and the site. Writing Generator Hooks section will provide more details on the topic.