Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Error when baking brand new razor template site #240

Closed
WalkerCodeRanger opened this issue May 4, 2015 · 4 comments
Closed

Error when baking brand new razor template site #240

WalkerCodeRanger opened this issue May 4, 2015 · 4 comments

Comments

@WalkerCodeRanger
Copy link

Just installed pretzel 0.2.0.42 from chocolatey and went to make a new razor site and got an error

C:\site>pretzel create -t=razor
starting pretzel...
create - configure a new site
Using razor Engine
Pretzel site template has been created

C:\site>pretzel bake
starting pretzel...
bake - transforming content into a website
Recommended engine for directory: 'razor'
Failed to render template, falling back to direct content
done - took 5808ms

C:\site>

Not sure which template it is actually failing on as most of the site seems to have been generated.

@johnboker
Copy link

It looks like in SiteConextGenerator.cs there is this code:

html = Path.GetExtension(file).IsMarkdownFile()                
    ? CommonMark.CommonMarkConverter.Convert(contentsWithoutHeader).Trim()
    : contentsWithoutHeader; 

the html generated by CommonMark.CommonMarkConvert.Convert is not valid for a razor template. It contains html entities like > that cause the razor engine to fail.

@laedit
Copy link
Member

laedit commented May 6, 2015

Thanks for the feedbak.
Normally this is fixed with the current master branch, can you try it?
You can find the latest binaries on AppVeyor.

@WalkerCodeRanger
Copy link
Author

Works when built from master branch (5df3cfa). You guys should either release a new version or at least update the docs to reflect that 0.2.0.42 isn't a good version. I was already moving to the master branch because I found it fixed issue #199 which is a pretty big deal too if you ask me.

@laedit
Copy link
Member

laedit commented May 6, 2015

I plan to release the v0.3 soon but before I want to fix some recent feedback like yours.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants