Chad Woolley
2008-Sep-06 01:29 UTC
[webgen-users] xhtml/doctype tags getting stuck in a paragraph in the body
Hi, I''m upgrading my site to the latest webgen. In my default template (based on andreas09 originally), I have these first two lines: <?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"> However, these get stuck in a <p> tag inside my body. I don''t know why. When I create a sample site with webgen, this does not happen, and I can''t tell what is different. Here is my config.yaml: # Configuration file for webgen # Used to set the parameters of the plugins default_meta_info: Page: blocks: default: {pipeline: tags,redcloth,blocks} Template: blocks: default: {pipeline: tags,redcloth,blocks} Thanks, -- Chad
Thomas Leitner
2008-Sep-06 05:19 UTC
[webgen-users] xhtml/doctype tags getting stuck in a paragraph in the body
> I''m upgrading my site to the latest webgen. In my default template > (based on andreas09 originally), I have these first two lines: > > <?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"> > > However, these get stuck in a <p> tag inside my body. I don''t know > why. When I create a sample site with webgen, this does not happen, > and I can''t tell what is different. Here is my config.yaml: > > # Configuration file for webgen > # Used to set the parameters of the plugins > default_meta_info: > Page: > blocks: > default: {pipeline: tags,redcloth,blocks} > Template: > blocks: > default: {pipeline: tags,redcloth,blocks}The problem most certainly is redcloth. Since redcloth considers *everything* as markup what is not valid HTML, ie. normal XML style tags, your doc type got stuck into a paragraph tag. If you don''t need redcloth in the template processing pipeline, you can just remove it and everything should be fine. Or you could surround the doctype with a <notextile> tag that prevents redcloth from converting it. When creating a new sample site, template files are not processed with any markup processor. Therefore it works there. Just a note: setting the processing will get a little easier in the next version. You can then say: default_processing_pipeline: Page: tags,redcloth,blocks Template: tags,redcloth,blocks -- Thomas
Chad Woolley
2008-Sep-06 23:02 UTC
[webgen-users] xhtml/doctype tags getting stuck in a paragraph in the body
On Fri, Sep 5, 2008 at 10:19 PM, Thomas Leitner <t_leitner at gmx.at> wrote:> The problem most certainly is redcloth. Since redcloth considers > *everything* as markup what is not valid HTML, ie. normal XML style > tags, your doc type got stuck into a paragraph tag. If you don''t need > redcloth in the template processing pipeline, you can just remove it > and everything should be fine.Thanks. I don''t need redcloth in my template, so I fixed it by overriding the pipeline to remove redcloth in the default template: --- pipeline:tags,blocks