perkeep/doc/publishing
Will Norris 620d837a3d website: update misc docs to markdown
- merge json-signing/json-signing.txt into json-signing/README.md
- rename publishing/README to publishing/README.md
- convert several doc/* files

Change-Id: I0bb7c03adcfac3848f97a70092de384c72f45958
2016-04-26 18:10:58 -07:00
..
README.md website: update misc docs to markdown 2016-04-26 18:10:58 -07:00

README.md

Publishing

Camlistore delegates publishing to the publisher server application, which uses Go html templates (http://golang.org/pkg/text/template/) to publish pages.

Resources for publishing, such as go templates, javascript and css files should be placed in the application source directory - app/publisher/ - so they can be served directly when using the dev server or automatically embedded in production.

You should then specify the Go template to be used through the configuration file. The CSS files are automatically all available to the app. For example, there already is a go template (gallery.html), and css file (pics.css) that work together to provide publishing for image galleries. The dev server config (config/dev-server-config.json) already uses them. Here is how one would configure publishing for an image gallery in the server config ($HOME/.config/camlistore/server-config.json):

"publish": {
  "/pics/": {
    "camliRoot": "mypics",
    "cacheRoot": "/home/joe/var/camlistore/blobs/cache",
    "goTemplate": "gallery.html"
  }
}

If you want to provide your own (Go) template, see camlistore.org/pkg/publish for the data structures and functions available to the template.