code52 / pretzel Goto Github PK
View Code? Open in Web Editor NEWA site generation tool (and then some) for .NET platforms
Home Page: http://code52.org/pretzel/
License: Microsoft Public License
A site generation tool (and then some) for .NET platforms
Home Page: http://code52.org/pretzel/
License: Microsoft Public License
In Jekyll, I can create an include for each of my js and css resources. Then, in my source directory, I have an "all-js.js" and "all-styles.css" which contain only an empty front-matter header and includes for each of my scripts/styles. This give me a simple way to "bundle" resources.
all-styles.css
---
---
{% include style/main.css %}
{% include style/syntax.css %}
In Pretzel, the includes are parsed and the files are generated, but with the wrong extensions. Instead of maintaining all-styles .css, for example, I end up with all-styles .html in the output.
After 3733300 commit SiteContextGenerator.BuildPages() process .css and all the images twice - first time as NonProcessedPage and second time as a page to process.
As a result Razor engine fails on @media element processing in style.css. To reproduce simply try to bake default site created with Razor engine.
pretzel taste seems to notice changes to my .htaccess file but they never get copied to _site
Unless it has a reason to be there. ping @distantcam @Aeoth
Clearing old content
Launching Pretzel
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute'
from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Server stack trace:
at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount,
IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInsta
ntiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethod
Arguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope
, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilte
rType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMeth
odInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataT
oken, RuntimeType attributeFilterType, Boolean mustBeInheritable)
at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit)
at System.RuntimeType.IsDefined(Type attributeType, Boolean inherit)
at Microsoft.Internal.AttributeServices.IsAttributeDefined[T](ICustomAttributeProvider attributeProvider)
at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.IsPartDiscoverable()
at System.ComponentModel.Composition.AttributedModel.AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable(Type
type, ICompositionElement origin)
at System.ComponentModel.Composition.Hosting.TypeCatalog.get_PartsInternal()
at System.ComponentModel.Composition.Hosting.TypeCatalog.CreateIndex()
at System.Lazy`1.CreateValue()
Exception rethrown at [0]:
at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount,
IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInsta
ntiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethod
Arguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope
, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilte
rType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMeth
odInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataT
oken, RuntimeType attributeFilterType, Boolean mustBeInheritable)
at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit)
at System.RuntimeType.IsDefined(Type attributeType, Boolean inherit)
at Microsoft.Internal.AttributeServices.IsAttributeDefined[T](ICustomAttributeProvider attributeProvider)
at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.IsPartDiscoverable()
at System.ComponentModel.Composition.AttributedModel.AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable(Type
type, ICompositionElement origin)
at System.ComponentModel.Composition.Hosting.TypeCatalog.get_PartsInternal()
at System.ComponentModel.Composition.Hosting.TypeCatalog.CreateIndex()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at System.ComponentModel.Composition.Hosting.TypeCatalog.GetCandidateParts(ImportDefinition definition) at System.ComponentModel.Composition.Hosting.TypeCatalog.GetExports(ImportDefinition definition) at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition) at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, Atomic Composition atomicComposition) at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComp osition atomicComposition, IEnumerable
1& exports)
at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, Atom
icComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComp
osition atomicComposition, IEnumerable1& exports) at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposit ion atomicComposition, IEnumerable
1& exports)
at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicC
omposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComp
osition atomicComposition, IEnumerable1& exports) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(ExportProvider provider, ComposablePart part, ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable
1 imports, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ImportEngine.TryPreviewImportsStateMachine(PartManager partManager, Comp
osablePart part, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ImportEngine.PreviewImports(ComposablePart part, AtomicComposition atomi
cComposition)
at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch)
at System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(CompositionBatch batch)
at Pretzel.Program.Compose() in c:\Code\pretzel\src\Pretzel\Program.cs:line 89
at Pretzel.Program.Main(String[] args) in c:\Code\pretzel\src\Pretzel\Program.cs:line 41
I got this happening a couple of times while moving from one page to another. Not sure about the exact scenario though. I'm using Windows Server 2008 R2 Standard
System.ObjectDisposedException was unhandled
HResult=-2146232798
Message=Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
Source=System
ObjectName=System.Net.Sockets.Socket
StackTrace:
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at Firefly.Utils.SocketWrapper.Shutdown(SocketShutdown how)
at Firefly.Http.Connection.<>c__DisplayClass9.b__4()
at Firefly.Utils.SocketSender.<>c__DisplayClass6.b__3()
at Firefly.Utils.SocketSender.SetStateImmediate()
at Firefly.Utils.SocketSender.DoSendCompleted()
at Firefly.Utils.SocketSender.SocketEventCompleted()
at Firefly.Utils.SocketEventWrapper.SocketEventCompleted(Object sender, SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(Object ignored)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
InnerException:
Will investigate later, just reporting for now
File change: C:\Users\Jake_Code\Documentation\img
Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'C:\Us
ers\Jake_Code\Documentation\img\2Controllers2.png'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Bo
olean overwrite, Boolean checkHost)
at System.IO.FileInfo.CopyTo(String destFileName, Boolean overwrite)
at System.IO.Abstractions.FileInfoWrapper.CopyTo(String destFileName, Boolean
overwrite) in :line 0
at Pretzel.Logic.Templating.Context.SiteContextGenerator.SafeReadLine(String
file) in c:\Users\Jake_Code\pretzel\src\Pretzel.Logic\Templating\Context\SiteCo
ntextGenerator.cs:line 249
at Pretzel.Logic.Templating.Context.SiteContextGenerator.ContainsYamlFrontMat
ter(String file) in c:\Users\Jake_Code\pretzel\src\Pretzel.Logic\Templating\Con
text\SiteContextGenerator.cs:line 146
at Pretzel.Logic.Templating.Context.SiteContextGenerator.d__c.Mov
eNext() in c:\Users\Jake_Code\pretzel\src\Pretzel.Logic\Templating\Context\Site
ContextGenerator.cs:line 76
at System.Collections.Generic.List1..ctor(IEnumerable
1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Pretzel.Logic.Templating.Context.SiteContextGenerator.BuildContext(String
path) in c:\Users\Jake_Code\pretzel\src\Pretzel.Logic\Templating\Context\SiteCo
ntextGenerator.cs:line 57
at Pretzel.Commands.TasteCommand.WatcherOnChanged(String file) in c:\Users\Ja
ke_Code\pretzel\src\Pretzel\Commands\TasteCommand.cs:line 88
at Pretzel.Modules.SimpleFileSystemWatcher.WatcherOnChanged(Object sender, Fi
leSystemEventArgs args) in c:\Users\Jake_Code\pretzel\src\Pretzel\Modules\Simpl
eFileSystemWatcher.cs:line 42
at System.IO.FileSystemWatcher.OnChanged(FileSystemEventArgs e)
at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String
name)
at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt
32 numBytes, NativeOverlapped* overlappedPointer)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
https://github.com/Code52/pretzel/downloads
The download over there seems to be outdated compared to the master.
We had assumed that dotLiquid included xml_escape
, when infact it doesn't. This isn't an upstream bug, because we assumed it did.
Solution is to add/replace the following code to the bottom of LiquidEngine.cs
public override void Initialize()
{
Template.RegisterFilter(typeof(XmlEscapeFilter));
Template.RegisterTag<HighlightBlock>("highlight");
}
}
public static class XmlEscapeFilter
{
public static string xml_escape(string input)
{
return SecurityElement.Escape(input);
}
}
Just tried to view the Code 52 past projects in a pretzel taste and it incorrectly rendered the layout so that the past projects wouldn't render properly.
It's obviously working in Jekyll for the site, but I'm wondering if the {{ <- braces in the jquery templating engine is confusing it?
I tried the latest and the output I got was similar to Visual Studio's "Publish" method.
I was under the impression that it'll generate a static (HTML+CSS+JS) site, is this not the goal?
Probably using the incorrect Console.Read* method.
Should be available in Liquid Templates:
Like NuGet, pretzel should support a 'pretzel update' command which will update in-place.
This will enable scenario's where the exe is copied into source control with documentation etc, and want to be able to simply update to the latest version.
The feature should be updated when extension support is added, so extensions are updated as well.
In the index.md file created by 'pretzel create -d DIR', the href value in the older posts list is incorrectly set to the value post.id, while it should be post.url for consistency with the 5 posts fully displayed above.
I normally am developing my side, i do not want pretzel to crash when I mistype something which causes my templates to fail to process.
Simply skip the file which has the problem, and report it in the console
from #68,
It says "Press any key to continue..." when "Q" is pushed to stop it, but it must be a Console.ReadLine() not ReadKey() because only an enter will quit it.
An installer would eliminate the need for users to add pretzel to their path (https://github.com/Code52/pretzel/wiki/Installing-Pretzel).
I want to extend the PageContext to have a DirectoryPages property, which contains the other pages in the folder.
This will enable me to create folders in my pretzel site for a category or multipart blog post.
Here is an example of the folder:
MyMultipartBlogPost
in my layout I will header the content with:
<li>
@foreach (var page in Model.DirectoryPages)
{
<li><a href="@page.Filename">@page.Title</a></li>
}
</li>
So when you view part 1, 2 or 3 you will get the other posts in the directory. and when I add part4, all the pages will update automatically.
Additional features would be supporting a 'order' keyword in the front matter etc.
The templating engines are only used when rendering a full page. So on the homepage of a blog, Liquid tags are not parsed because they are unparsed in the Posts collection of the SiteContext.
This is the current flow:
This can be fixed by:
When using pretzel create, a file called about.md is created in the root folder. It contains the following YAML Front Matter:
---
layout: post
title: About
comments: false
---
Still, the generated about.html file does render Disqus comments. It does that whenever comments has some value. For example: comments: PretzelsAreDelicious will also render the comments. Only deleting the line entirely will result in no comments.
System.InvalidOperationException was unhandled
HResult=-2146233079
Message="An asynchronous socket operation is already in progress using this SocketAsyncEventArgs instance.";
Source=System
StackTrace:
at System.Net.Sockets.SocketAsyncEventArgs.StartOperationCommon(Socket socket)
at System.Net.Sockets.Socket.ReceiveAsync(SocketAsyncEventArgs e)
at Firefly.Utils.SocketWrapper.ReceiveAsync(SocketAsyncEventArgs e) in :line 0
at Firefly.Http.Connection.Go(Boolean newFrame) in :line 0
at Firefly.Http.Connection.b__13(Object _) in :line 0
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
InnerException:
I've been looking for something like Pretzel that runs on .NET, but the lack of documentation and tutorials make it very, very hard to start using it.
I haven't used Jekyll or anything like it before, so I'm really just trying to figure it out using trial/error (which isn't ideal as you'd imagine).
Can we confirm that there are no issues with executing build and test steps under Mono?
Can we document how someone running Mono/MonoDevelop/SharpDevelop can build their own version of pretzel locally?
It would be really nice to support virtual directories.
i.e
pretzel bake . /vdir:someDir
This would then automatically replace any src="/css/my.css" with src="/someDir/css/my.css" (also should replace href="")
No parameter provided -> opens base URL in user's default browser
--nobrowser
provided -> does not open base URL
It would be nice if there was support for post excerpts. I'm not sure if this would be better handled via an extension or part of the core.
Markdown conversion is processed by the SiteContextGenerator
, but that causes some... issues.
{{ site.time | date: "yyyy" }}
should return 2012 for todays date, but depending on where its called, it won't if the Markdown conversion happens before templates are generated/processed. It looks like content conversion (currently just markdown) will have to happen at the template level (via a reusable extension preferably)
If I have a file which is generated with spaces in the name, I get a 404
I need some ability to specify "environment" when baking / exporting the pages. For example I might need one that's for live (i.e. _config_live.yml) and one for local (i.e. _config_local.yml) etc. Is there a way to do that? So I would expect something like this when I am calling the bake:
For live
.\Pretzel.exe -t razor -c _config_live.yml -d .\live_site
For local
.\Pretzel.exe -t razor -c _config_local.yml -d .\local_site
Able to recreate this consistently.
Should update pretzel to ignore changes to .TMP files
Some of the other Code52 projects include a License.md that states MsPL. There's no license listed for pretzel - is it under MsPL as well? Are all projects unless otherwise states?
There are breaking changes, but shouldn't be too hard to do now that the rest of the packages are up to date.
Hi,
with merging 4bf2f0b into Code52:master the Visual Studio solution has been converted to version 12.
Both Visual Studio 2010 and #Develop 4.2 Beta 2 cannot open this format.
This stops at least me from working on pretzel.
Please downgrade the solution and DO NOT upgrade it again until VS2011 has been released. Thanks!
/Dirk
I tried running Pretzel right then specifying the engine and it didn't give any errors, didn't notify of port and even when I specified port didn't run.
Without specifying an engine it worked fine.
Even when generating a website with Pretzel create command, and baking it. The resulting website is missing the date output on the index html file, even if the dates are present in the posts filenames...
Hey guys,
I would like to include a .csproj and a web.config with the razor template, allowing it to be opened in VS and edit the .csproj files.
The main issue with this is the project either needs to reference the models, this could be via .dll, including a .cs in the package or by referencing the pretzel exe.
Or is intellisense not that important (I would like it because it adds discoverability of features, and allow people to come up with cool ways to use razor in pretzel).
Thoughts?
Generate a sitemap.xml compliant to the sitmap protocol based on the links found in the website. This improves the access for search engines.
See also: http://www.sitemaps.org/
Putting pretzel on a build server without MVC installed, I got this:
[15:05:21][Step 1/2] Unhandled Exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
[15:05:21][Step 1/2] at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
[15:05:21][Step 1/2] at System.Reflection.RuntimeModule.GetTypes()
[15:05:21][Step 1/2] at System.Reflection.Assembly.GetTypes()
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) [15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) [15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable
1& exports)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable1& exports) [15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) [15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable
1& exports)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(ExportProvider provider, ComposablePart part, ImportDefinition definition, AtomicComposition atomicComposition)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComposition)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ImportEngine.TryPreviewImportsStateMachine(PartManager partManager, ComposablePart part, AtomicComposition atomicComposition)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ImportEngine.PreviewImports(ComposablePart part, AtomicComposition atomicComposition)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch)
[15:05:21][Step 1/2] at System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(CompositionBatch batch)
[15:05:21][Step 1/2] at Pretzel.Program.Compose() in c:\Users\Jake_Code\pretzel\src\Pretzel\Program.cs:line 89
[15:05:21][Step 1/2] at Pretzel.Program.Main(String[] args) in c:\Users\Jake_Code\pretzel\src\Pretzel\Program.cs:line 41
Adding a catch around loading to catch that exception I got:
Could not load file or assembly 'System.Web.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException
Can't find C:\website\_site\index.html
at System.IO.Abstractions.TestingHelpers.MockFile.ReadAllText(String path)
at Pretzel.Tests.Templating.Jekyll.LiquidEngineTests.When_Paginate_With_No_Posts.Index_Is_Generated() in LiquidEngineTests.cs: line 211
Emulate the behaviour of IIS Express, but leverage the existing work of pretzel.
Support for LINQ queries in Razor views would be very helpful. Without LINQ, we need to resort to nested foreach{ } loops and if{ } statements to find pages by Tag or other Bag keys.
More broadly, it would be great to be able to import any namespace into a Razor view.
Urls do not match up with the location which the files are generated. Pages do not conform to the URL schemes that Posts adhere to.
TODO:
Repro:
Git Clone
run build.cmd
Output:
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18010]
Copyright (C) Microsoft Corporation. All rights reserved.
=========== Compile ===========
All packages listed in packages.config are already installed.
All packages listed in packages.config are already installed.
All packages listed in packages.config are already installed.
Pretzel.Logic -> D:\Code\oss\pretzel\src\Pretzel.Logic\bin\Debug\Pretzel.Logic.dll
Pretzel -> D:\Code\oss\pretzel\src\Pretzel\bin\Debug\Pretzel.exe
Pretzel.Tests -> D:\Code\oss\pretzel\src\Pretzel.Tests\bin\Debug\Pretzel.Tests.dll
=========== Compile Done ===========
Pretzel.exe is available at D:\Code\oss\pretzel\artifacts
=========== Run Tests ===========
xUnit.net MSBuild runner (32-bit .NET 4.0.30319.18010)
xunit.dll: Version 1.9.0.1566
Test assembly: D:\Code\oss\pretzel\src\Pretzel.Tests\bin\Debug\Pretzel.Tests.dll
D:\Code\oss\pretzel\build.proj(39,5): error : Pretzel.Tests.Templating.Jekyll.LiquidEngineTests+When_Paginate_With_No_Posts.Index_Is_Generated: System.NullReferenceException : Object reference not set to an instance of an object.
D:\Code\oss\pretzel\build.proj(39,5): error : at System.IO.Abstractions.TestingHelpers.MockFile.ReadAllText(String path)
D:\Code\oss\pretzel\build.proj(39,5): error : at Pretzel.Tests.Templating.Jekyll.LiquidEngineTests.When_Paginate_With_No_Posts.Index_Is_Generated() in d:\Code\oss\pretzel\src\Pretzel.Tests\Templating\Jekyll\LiquidEngineTests.cs:line 211
D:\Code\oss\pretzel\build.proj(39,5): error : Pretzel.Tests.Templating.Jekyll.LiquidEngineTests+Givet_Page_Use_Filter.The_Output_Should_Be_Slugified: System.NullReferenceException : Object reference not set to an instance of an object.
D:\Code\oss\pretzel\build.proj(39,5): error : at System.IO.Abstractions.TestingHelpers.MockFile.ReadAllText(String path)
D:\Code\oss\pretzel\build.proj(39,5): error : at Pretzel.Tests.Templating.Jekyll.LiquidEngineTests.Givet_Page_Use_Filter.The_Output_Should_Be_Slugified() in d:\Code\oss\pretzel\src\Pretzel.Tests\Templating\Jekyll\LiquidEngineTests.cs:line 481
D:\Code\oss\pretzel\build.proj(39,5): error : Pretzel.Tests.Templating.Razor.When_Paginate_Razor.Posts_Properly_Paginated: System.NullReferenceException : Object reference not set to an instance of an object.
D:\Code\oss\pretzel\build.proj(39,5): error : at System.IO.Abstractions.TestingHelpers.MockFile.ReadAllText(String path)
D:\Code\oss\pretzel\build.proj(39,5): error : at Pretzel.Tests.Templating.Razor.When_Paginate_Razor.Posts_Properly_Paginated() in d:\Code\oss\pretzel\src\Pretzel.Tests\Templating\Razor\RazorEngineTests.cs:line 156
Tests: 105, Failures: 3, Skipped: 0, Time: 6.946 seconds
Press any key to continue . . .
Granted, the .exe output is produced nonetheless, but it sure is confusing and suboptimal first experience.
Should be easy to track down if someone wants some low-hanging fruit to get started.
Under 'taste', if you use the incorrect template engine, no error is given. Example, early on we called what is now known as 'liquid', 'jekyll'. Many of us still default to entering this command in:
pretzel taste -t jekyll -d C:\code\code52\code52.github.com -p 1234
When in fact it should be
pretzel taste -t liquid-d C:\code\code52\code52.github.com -p 1234
No error is given that an invalid engine is selected. This caused confusion in #68 where it seemed like taste did not work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.