love to code .net

blogging mostly about one of my favorite subjects, programming

Month List


BlogEngine.NET ignores Windows Live Writer post date

I started trying to automate future posts by specifying a post date that was in the future.  Directly posting through the BlogEngine.NET web interface works without a hitch.  When using Windows Live Writer though the post is posted using the current date and time, making it immediately visible.  I found the cause of this problem was in the BlogEngine.Core.API.MetaWeblog class.  The particular problem is that WLW doesn't provide pubDate, instead it provides dateCreated.  Here is the code that needs to be changed that can be found in the GetPost method of the MetaWeblog class.

More...

BlogEngine.NET code formatter extension shows code tag

While evaluating BlogEngine.NET, I noticed the code tag was shown on the first and last line of the formatted code block.  At first, I thought I was using incorrect syntax.  After I checked my syntax and found this post, where you can see the open and close code tag, I realized it was an problem.  So I looked around and found the cause of the problem.  Here's the method that causes the problem.

More...

Proper line numbering with BlogEngine.NET and source code without line feeds

I wanted to use Windows Live Writer to create my posts.  Before going live, I decided to test out WLW with a few posts.  During the tests I noticed that code was being shown with multiple lines, but only one line number.  After looking at the XML posts and code, I noticed that the source code formatter expects each line to be separated by a line feed and that WLW separates lines by a <br/> with no line feed.  So my simple solution was to modify the code sections before they get formatted to insure that there is a line feed after each <br/>.

More...

BlogEngine.NET Alternate Line Highlighting breaks formatting

In testing out BlogEngine.NET, I found an issue with the source code formatter when alternate line highlighting is enabled.  When the alternate line highligting option was on, the code would show the first line in the code block with code formatting, but all subsequent lines appeared outside of the code block without code formatting.  In the following original code, you see that line 41 opens a div tag for an even line, and line 37 opens a p tag for an odd line.  Unfortunately, as you can see on line 54, the code closes both tags as a div.  This invalid syntax is what breaks the formatting.

More...