-
Notifications
You must be signed in to change notification settings - Fork 107
Upgrading
In version 0.4, Punch underwent major rewrite at the core. This introduced certain modifications to the flow and how projects should be organized. If your site was created using a version prior to 0.4, these tips will help you to get it to work with the new version.
-
In the earlier versions, you had to define a layout for each page in the site. But with version 0.4, you can define inheritable layouts. Read the Templates section for more details.
-
Apart from the JSON files named after page names, Punch allowed you to define extended content such as Markdown files inside a directory named by the page name. From version 0.4, these extended directory names must be preceded with an underscore (eg.
index
>_index
). This will allow you to easily figure out the extended content directories from the directories used for separatng sections. -
Default output directory was changed from
public
tooutput
. -
Some of the old configuration options became obsolete and some new configuration options were added. Check Configuration Options for updated list of configurations.
-
To publish a site, now you only need to run
punch publish
(orpunch p
). No need to specify the strategy in the command. Instead, you have to specify the publishing strategy and options inconfig.json
as follows:
"publish" : {
"strategy" : "s3",
"options" : {
"key" : "key"
, "secret" : "secret"
, "bucket" : "bucketname"
}
}
- In early versions, it was possible to use Punch's renderer on client-side as well. However, with version 0.4 this would not be possible. It now depends on Node.js' default Event Emitter. However, there are plans to revisit and improve the workflow for client-side rendering in future.