statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.65k stars 236 forks source link

Writing tool #100

Open dodyg opened 8 years ago

dodyg commented 8 years ago

At the moment Wyam is a PITA to use on a day to day basis as a publishing tool. You have to twiddle with metadata and figure out where to put your files etc.

At some point, perhaps after #1 and #72 are implemented, we should start considering building a minimalist interface, perhaps as separate project, for writing and publishing (e.g. http://radio.userland.com/) via a web interface.

Perhaps using http://electron.atom.io/ (on 2nd thought, this could be an overkill)

daveaglick commented 8 years ago

I agree a GUI would be awesome. I mentioned this briefly in #64 too. Ideally you could point it at an installation folder and it could use reflection to determine what modules are available and what their API looks like. It should also be able to load a config file and add any additional modules provided by library references, NuGet packages, or definition sections in the config.

Unfortunately, I think this is a little ways off. As you mentioned, recipes and themes are my number 1 priorities right now. The good news is that those two things should also go a long way towards reducing pain. I intend for several in-the-box recipes to provide just as much power as something like Jekyll (I.e., the "blog" recipe will have conventions for where to put certain types of files, several customization options, etc.) In my mind, the completion of recipes will showcase the tool's power as a static generator toolkit - with each recipe being essentially a different static generator in and of itself (though same .exe obviously).

yetanotherchris commented 8 years ago

One of the biggest pain points I've had is the lack of intellisense with the .wyam files and the cshtml files. Maybe I've been doing it wrong, but if there was a way around that I think Visual Studio as the UI would be the best solution.

I've got a SublimeText build project setup right now which works well, but has no intellisense.

daveaglick commented 8 years ago

Yeah, I would love to get Intellisense.

The problem right now is that since the config files run through an external tool, Visual Studio (and Visual Studio Code) don't know about any of the Wyam libraries (and additional loaded dependencies). Even if we associated .wyam in VS with C# Intellisense, it wouldn't do much good because you'd only get completion for built-in language features. To support full completion, we'd have to tell the Intellisense engine not only about Wyam.Common and Wyam.Core, but also every module library that gets loaded. I'm pretty sure there are ways to do this, so it'll just have to wait until I (or someone else) gets a chance to look at it in depth.

There's also the matter of the automatic lambda substitution in config files. That was added to make the config files easier to read and write for folks who aren't familiar with C# lamda syntax (which can look strange if you've never seen it). Unfortunately, it might really mess up the Intellisense engine since it's not actually C#. It's something that'll need to be dealt with as part of this process.

daveaglick commented 8 years ago

Note to self: Investigate what it would take to get a linter and background build addin up and running for VS Code. Perhaps the "language server" support in the VS Code extension API will be more robust by then and we can run a little C# Wyam language server that precompiles configs in the background (though porting over to .NET Core may be a prerequisite for this since VS Code is xplat).