-
Notifications
You must be signed in to change notification settings - Fork 107
Organizing the Site
Organization of files in a typical Punch project will look like this:
.
├── config.json
├── contents
│ ├── _about
│ │ └── history.markdown
│ ├── about.json
│ └── services
│ ├── index.json
│ ├── seo.json
│ ├── web_design.json
│ └── web_hosting.json
├── templates
│ ├── _layout.mustache
│ ├── assets
│ │ └── logo.jpg
│ ├── index.mustache
│ └── services
│ └── _layout.mustache
└── output
├── about.html
├── assets
│ └── logo.jpg
├── index.html
└── services
├── index.html
├── seo.html
├── web_design.html
└── web_hosting.html
Separation of content from its presentation, is one of the primary design goals of Punch. This will help you to create sites that are easy to maintain and extend (eg. Targeting mobiles, Localization & A/B testing).
By default, Punch creates two directories named contents
and templates
for this purpose. All the information you want to communicate to the users should be placed in contents
and the materials that aids the presentation of the information (layouts & assets) should be placed in templates
. Refer the sections on Contents and Templates, to learn more about their hierarchical organization.
The Configuration Options for the project should be defined in the config.json
.
Punch will store the generated site in the output
directory. When it comes to hosting, you can point to this directory as the virtual host root in your server configurations. If you are hosting the site in a remote server, you can just upload this directory there. For more details on publishing, refer to Publishing a Site section.