MarkdownDeep Improved URL Qualification

Tuesday, 29 March 2011

MarkdownDeep's URL qualification makes unqualified URLs work properly in RSS feeds.

MarkdownDeep now has two properties that are used for qualifying URLs contained within the Markdown - UrlBaseLocation and UrlRootLocation. UrlBaseLocation has always been there but Root location is new. These are little confusing so I thought I'd write it up.

  • UrlBaseLocation should refer to the location of the document being processed and is used to qualify unqualified URL's that don't begin with a slash.

  • UrlRootLocation should refer to the root location of the document being processed and is used to qualify unqualified URL's that do begin with a slash. So for example,

For example, if UrlBaseLocation is set to "http://toptensoftware.com/articles" and UrlRootLocation is set to "http://www.toptensoftware.com", then

  • [See this article](article2) would be qualified to "http://toptensoftware.com/articles/article2" whereas
  • [Introducing PetaPoco](/petapoco) would be qualified to "http://toptensoftware.com/petapoco".

The UrlBaseLocation property is useful when working with ASP.NET applications where the document root isn't the domain root.

All these improvements are available now in github and the latest NuGet packages.

« MarkdownDeep Head Block Extraction MarkdownDeep Syntax Highlighting »

Leave a comment

Name (required)
Email (required, not shown, for gravatar)
Website (optional)
Your Message
Leave these blank: