You need to put the following into your config.yaml file:
default_processing_pipeline:
Page: haml,fragments
Normally, the processing pipeline also includes erb, tags and blocks
tags, but I think they are not needed when using haml since haml
includes facilities to execute ruby commands (and tag results can still
be used through the context object as well as block rendering).
If you need to change the default for template files, just add another
entry with Template as key instead of Page.
If you want to use sass for your CSS files, just name them something
like default.sass.css. This will tell the copy handler that sass should
be run on the content before writing it to the output path.
If you need further help, don't hesitate to write again!
Best regars,
Thomas
config.yaml
===========
default_processing_pipeline:
Page: haml,fragments
Template: haml,fragments
default.template
================
!!! XML
!!! 1.1
%head
%link{:rel => "stylesheet", :type => "text/css", :href =>
"default.css"}
%title= context.node["title"]
%body
= context.render_block("content")
index.page
==========
---
title: A page
---
%h1 A heading
The resulting index.html
========================
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
<head>
<link href='default.css' rel='stylesheet' type='text/css' />
<title>A page</title>
</head>
<body>
<h1>A heading</h1>
</body>
> webgen-us...@rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users
> Thank you for your help! I think I'm getting the hang of it now. Just
> for future
> reference, this is a bare bones setup:
>
> config.yaml
> ===========
> default_processing_pipeline:
> Page: haml,fragments
> Template: haml,fragments
>
You only need to specify the fragments content processor once. If you
specify it for the page file, only headers of the page content itself
will be mapped to fragment nodes. If you specify it for templates, all
headers will be mapped to fragment nodes which may not be what you
want. Also note that only headers with IDs get mapped to fragment nodes.
-- Thomas
_______________________________________________
webgen-users mailing list
webgen...@rubyforge.org
http://rubyforge.org/mailman/listinfo/webgen-users
Ah, okay. Good to know.