Code52 / pretzel

A site generation tool (and then some) for .NET platforms
http://code52.org/pretzel/
Microsoft Public License
600 stars 164 forks source link

Virtual Directory Support and Protocol-relative URLs #367

Open foundinhim opened 4 years ago

foundinhim commented 4 years ago

Virtual directory support incorrectly prepends the virtual directory to protocol relative URLs

To Reproduce

  1. I created my site with: pretzel create --t=razor --withproject
  2. Then I baked it: pretzel bake --cleantarget --t=razor --destination=docs --vDir=somesite.github.io

This produces <link rel="stylesheet" href="/somesite.github.io//cdn.jsdelivr.net/highlight.js/8.4/styles/default.min.css" />

Expected behavior I would expect the virtual directory option to ignore protocol-relative URLs.

Desktop (please complete the following information):

laedit commented 4 years ago

Thanks for the issue! :) I will try to fix it as soon as I have some spare time but I can't make any promises. A PR would be rewarded with my infinite thanks!

foundinhim commented 4 years ago

@laedit, you're welcome, and thank you for looking at this. Perhaps one day I'll have a chance to contribute. This concept is entirely new to me. I heard about Pretzel from Plural Sight.

biohazard999 commented 4 years ago

@laedit the last PR's for the global tool are in the making (around weekend), probably I'll look into that

laedit commented 4 years ago

@biohazard999 Thanks! :D

laedit commented 4 years ago

@foundinhim No problem. I didn't even knew that Pretzel was on Plural Sight :)

foundinhim commented 4 years ago

@foundinhim No problem. I didn't even knew that Pretzel was on Plural Sight :)

@laedit, It is mentioned as one of the alternatives to Jekyll in Serverless Web Applications

laedit commented 4 years ago

Thanks for the link!