Giter Club home page Giter Club logo

pretzel's Introduction

/!\ It has been a while since we lost the time and will to work on this project, so it has been archived.

Feel free to fork it and proposed an adapted version, or to use Wyam, Statiq.Web, Jekyll in Windows or any other static site generator.


AppVeyor build status Coverity Scan Build Status Coverage Status Ptrezel tag on Stack Overflow Chocolatey Nuget

Pretzel

A simple, pluggable site generation tool for .NET developers and Windows users (with Mono support planned I think).

Pretzel follows the same conventions as Jekyll and should be compatible with basic Jekyll websites. If you are not familiar with Jekyll, have a read at http://jekyllrb.com/docs/usage/.

Usage

The principal commands are the following but more informations are available on the wiki

Create is used to create the folder structure for a new site:

pretzel create

If the site should be at a specific folder, this can be specified as a parameter:

pretzel create C:\path\to\folder

Bake is used to generate a site based on the contents of a folder.

To scan the current directory for a website and detect the content to process, run:

pretzel bake 

To scan a specific folder and parse the contents, run:

pretzel bake C:\path\to\folder

To explicitly specify the input - we should support inferring the input based on the files found anyway - run:

pretzel bake --engine liquid

Taste is for testing a site locally - make a change, and pretzel should handle regenerating the page when a file changes.

To test a site locally, run:

pretzel taste 

To specify the port to serve the site from (default will be 4000), run:

pretzel taste --port 5000

To stop the site, press q.

More information on the wiki.

Plugins

Plugins are supported in pretzel, more info on the dedicated wiki page.

Contributing

All contributions are welcome, please read our contributing guide.

Attribution

Pretzel” symbol by Edward Boatman on The Noun Project, from The Noun Project collection.

pretzel's People

Contributors

alexkopy avatar andreimarukovich avatar andrewtobin avatar andrexx avatar andreyakinshin avatar biohazard999 avatar dkarzon avatar dubeaud avatar hartez avatar jakeginnivan avatar keesschollaart81 avatar khellang avatar kodfodrasz avatar laedit avatar lukencode avatar markheath avatar markvantilburg avatar rolandbaer avatar ronnykarlsson avatar s-moon avatar shiftbot avatar shiftkey avatar shiftkey-tester avatar switchspan avatar tathamoddie avatar tditiecher avatar thiagojedi avatar thoemmi avatar tiernano avatar vikingcode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pretzel's Issues

Virtual Directory Support

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="")

Maintain Extensions of Front-Matter Files

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.

tests seem to be broken

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

Publishing to chocolately automatically using TeamCity

TODO:

  • wireup configuration on TeamCity to build on new changes
  • fix the failing test which is due to whitespace and probably jgit doing LF instead of CRLF
  • proper versions and linking to git hash in local scripts and TeamCity builds
  • get chocolatey packages being created as well as zip packages
  • get version flowing from TeamCity into packages (with dev build having a placeholder version)
  • ping @JakeGinnivan to get details of chocolatey creds
  • do we want a pre-release and stable packages?

Visual Studio 11 Beta required for editing Pretzel

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

Discussion: Documentation/Multipart blog support

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

  • Part1.md
  • Part2.md
  • Part3.md

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.

Press Q to exit does not exit Taste

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.

it crashes

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.Lazy1.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, IEnumerable1& 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, IEnumerable1& 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

'Page' support is broken

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.

Crash when System.Web.Razor not installed

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, IEnumerable1& 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, IEnumerable1& 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.

Exception while navigating between pages during tasting

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:

Crash when browsing a site hosted in Pretzel taste

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:

Liquid tags are not parsed in index pages

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:

  • Baking is started
  • SiteContext is built
    • The 'Posts' collection is created. The markdown files are converted to HTML
    • The 'Pages' collection is created.
  • Pretzel loops over the Posts and parses the Liquid tags
  • Pretzel loops over the Pages and parses the Liquid tags
    -> BUG: If you access the Posts collection here (eg. to create an index page with your most recent blog posts), the Liquid tags are still unparsed.

This can be fixed by:

  • either updating the Posts collection after parsing the Liquid tags
  • or parsing the Liquid tags while adding the posts in the first place (though this will probably break paging)

images are pocessed twice

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 should not crash when 'taste' is running

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

Markdown conversion "too soon"

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)

Discussion: Razor intellisense

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?

date not working

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...

add support for LINQ queries in razor views

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.

Update Self

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.

dotLiquid does not include xml_escape filter

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);
        }
    }

YAML Front Matter "comments: false" doesn't work as expected (in about.md)

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.

Build failure on clone (from tests)

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.

No source code license is listed

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?

When failing to specify a correct template engine, no error given

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.

This project needs documentation

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).

Support for Excerpts

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.

Error running Taste with Template Engine

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.

PretzelExpress - tray app which makes user experience better

Emulate the behaviour of IIS Express, but leverage the existing work of pretzel.

Why?

  • Because scribble needs something more polished than opening a console and showing the raw output.
  • Because I'm lazy and want it to "remember" what sites I was testing across sessions

Features

  • single-instance app - subsequent startups should create a new "site"
  • some internal storage for tracking the active sites - Akavache?
  • tray icon should behave like IISExpress (list active sites, add site, stop site)

Deleting images causes crash

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(IEnumerable1 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)

JQuery Templating/yaml issue?

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?

Wrong href creation in index.md

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.

Is there a way to specify a different _config.yml when baking?

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

Mono Support for Windows

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.