Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 13 20:51
    atiq-cs commented #875
  • Jan 10 10:52
    SilentSin commented #727
  • Jan 10 00:06
    KybernetikGames opened #885
  • Dec 30 2019 23:09
    codeease1 commented #880
  • Dec 30 2019 23:08
    codeease1 commented #880
  • Dec 30 2019 23:07
    codeease1 commented #880
  • Dec 30 2019 23:05
    johncrim edited #884
  • Dec 30 2019 23:04
    johncrim edited #884
  • Dec 30 2019 23:04
    johncrim opened #884
  • Dec 28 2019 04:59
    cup closed #882
  • Dec 28 2019 04:59
    cup opened #883
  • Dec 28 2019 02:32
    cup opened #882
  • Dec 24 2019 15:20
    johncrim edited #881
  • Dec 24 2019 15:20
    johncrim edited #881
  • Dec 24 2019 15:20
    johncrim opened #881
  • Dec 15 2019 05:01
    codeease1 opened #880
  • Dec 14 2019 08:51
    SilentSin commented #795
  • Dec 13 2019 20:33
    tylerd synchronize #879
  • Dec 13 2019 19:17
    tylerd commented #879
  • Dec 13 2019 19:09
    tylerd opened #879
Dave Glick
@daveaglick
I should probably at least get the site up - I mean, it's not a great look for a web site generator not to have a web site
John Zabroski
@jzabroski
:rabbit2: speed
Thanks, that's helpful to know. I signed up to help out with Razor.Light and have no clue WTF I signed up for.
Been trying to just get .net core sdk 3.0 working last night and banging my head against the wall.
(To be clear, can't even get Visual Studio to recognize the .net core sdk 3.0 exists...)
Dan Pettersson
@deap82
The markdown files placed under the "blog" folder in a site that uses the Docs recipe are all located directly in the blog folder when the site is generated, even if they're organized in sub folders in the input folder. This makes it tricky to reference image files as the same thing does not happen with image files. I.e. the path from the markdown file to the image differs in input folder vs the output folder which makes use of markdown preview editor while working on the file in the input folder hard to benefit from. Is there any easy way to adapt the blog output generation so that folders are kept, and urls to the blog posts contains the whole path? Or adapt the copying of image files so that they are also output directly in the blog folder? Should this be a part of the recipe? Obviously I could put all files directly in the blog folder also in the input folder, but that will eventually result in a really large folder so I have from start organized posts in to "month folders" and any images for a post is in the same folder as the markdown file.
Gurpreet Singh Sohal
@swissarmykirpan
Hey all, I am trying to use the wyam engine to create some html files using razor. I am trying to add to the pipelines collection but Visual Studio keeps giving me errors saying that the pipelines collection is not available because Wyam.Common has not been referenced, eventhough it has!
If I add the reference manually (rather than through nuget) it works....
თამარ მჭედლიშვილი
@Tamar.Mchedlishvili_gitlab
Hi all. I need your help. I am trying to use existing templates of Wyam (like Trophy, Phantom and etc) for my web-page which is generated by Wyam. Can somebody please tell me how to do that. Thank you very much in advance!
Lee Conlin
@hades200082
I just tried the 4 steps on the homepage to get started but the /about link 404's when hosted in IIS
about.html has been generated.
Is there something I need to do to get the routing to work to map friendly URL's to the html files generated?
Dave Glick
@daveaglick
@hades200082 Yeah - IIS doesn't support extensionless URLs by default - you either need to add a rewrite rule to your web.config similar to the one at https://wyam.io/docs/deployment/azure or disable extensionless link generation by adding this to your Wyam config file Settings[Keys.LinkHideExtensions] = false;
What's actually going on here is that Wyam outputs files with an .html extension but many web hosts, and particularly those that inherently support static site generators like Netlify, will map a URL that isn't found to a file on disk with an .html extension. That gives the appearance of a web server with routes while being served from plain old HTML files. It works the same way for any static site generator - if you see links like /foo/bar there's very likely a /foo/bar.html file on the server. IIS doesn't know or care about this convention though so if you want to use it you need to tell IIS how to do so (or settle for all the links in the site having the .html extension).
Dave Glick
@daveaglick
@Tamar.Mchedlishvili_gitlab The templates are typically delivered via NuGet packages, but that's abstracted further by specifying the --theme command-line argument - there's an internal mapping of theme name to package. So for example, to use the Trophy theme you can use --teheme trophy from the command-line. You can also do the same by adding #theme trophy to your Wyam config file.
You could also manually download the theme files from the GitHub repository and place them in the "theme" folder alongside the "input" folder - that's handy if you want to further customize the theme
@swissarmykirpan If you're doing anything with the engine, I'd recommend using Statiq instead: https://github.com/statiqdev/Statiq.Framework - while in-the-box blog and documentation support isn't ported to Statiq yet, the entire framework including the engine is and it's much, much cleaner to use from Statiq than Wyam (the readme there has all the details)
Not to mention a ton of stuff has been updated in Statiq, including support for the ASPNET Core 3.0 Razor engine (as opposed to the 2.2 Razor engine that Wyam uses)
Lee Conlin
@hades200082
@daveaglick thanks for that. Are their any tutorials you could point to that show how to get setup with Visual Studio or Rider for editing the config, etc. as I am missing my intellisense ;)
თამარ მჭედლიშვილი
@Tamar.Mchedlishvili_gitlab
@daveaglick Thank you for your answer! I have one more question if you do not mind. I have already cloned the source which contains the themes. But now I need to find the file where I should open the console to write the commands which you told me.
Simon Morgan
@drguildo
is there a way to link from one blog post to another based on the local filename rather than the generated url?
the equivalent of {{< ref "/post/some-blog-post.md" >}} in hugo
damccull
@damccull
@daveaglick I see that the "Published" key in the blog template is converted to a DateTime. What format would I need in order to specify a timezone?
Dave Glick
@daveaglick
@damccull It uses DateTime.TryParse() under the hood so any string that can be parsed should do the trick - it also uses the setting "DateTimeInputCulture" to determine culture for dates when parsing, so you can change that setting to match the culture of the dates in the frontmatter if needed
@drguildo Sorry for the long delay - Gitter has been unreliable with notifications for me recently so just seeing your question. If you have the actual document (I.e., you're iterating over documents in a Razor template) you can call @ctx.GetLink(document) or one of it's overloads and that'll produce the appropriate link. There isn't really an equivalent to what you're asking exactly like Hugo though since there's no "ambient" collection of documents to check
Dave Glick
@daveaglick
@hades200082 The trick to getting Intellisense in your Wyam config (at least in VS Code) is telling it to treat the config.wyam file as if it's C#. You won't get Intellisense for Wyam stuff, and it'll act a little goofy around some of the delegates since the config file isn't exactly C#, but it's close. Add a .vscode/settings.json file with the following content:
{
    "files.associations": {
        "*.wyam": "csharp"
    }
}
damccull
@damccull
@daveaglick One more question: You upgrading to 3.1 anytime soon? I'm just waiting on wyam to delete 2.1 ;D
Mattias Karlsson
@devlead
@daveaglick Might make sense to switch to DateTimeOffset as that can contain time zone info.
Dave Glick
@daveaglick
@damccull 😬 I don't think Wyam will go 3.1 (or 3.0). It's essentially in servicing mode right now while Statiq gets completed. The good news is that Statiq already targets 3.0 (and will move to 3.1 very soon) and the blog/docs porting for Statiq is getting closer and closer.
@devlead Yep 👍 - yet another thing to get right this time around
damccull
@damccull
Ooh what's Statiq?
Nm, I see what it is. Why is it? Wyam not a good enough name? I like it. I like Statiq too though...hmm...
Lee Conlin
@hades200082
@daveaglick Thanks... I was hoping for a better integration with VS though. As it sits right now it's very difficult to sell into a .Net team that's used to working in VS/Rider for .Net development due to it not really being C#
Mattias Karlsson
@devlead
@hades200082 that's why Statiq "Wyam vnext" essentially is a console app, so full tooling support.
Dave Glick
@daveaglick
Yep exactly - @hades200082 one of the "pitches" I'm using for Statiq is that it's essentially "ASP.NET Core for static sites" - I.e., it's a normal console app with a builder-style fluent interface that you configure/extend in VS as a normal .NET app
Lee Conlin
@hades200082
Thanks. Just had a look at Statiq and seems much better however having a licence fee for commercial use will make it a hard sell too vs Gatsby and Hugo which are both free and more widely known/used. If you want it to gain traction I’d suggest making Statiq free for all uses and if you really want to monetise it, do so by selling training and/or specialised modules
Dave Glick
@daveaglick
@hades200082 I hear what you're saying, and the licensing FAQ explains things in more detail than I can in a chat, but I gave the licensing switch a lot of thought before making it and it's unlikely to change at this point. The short story is that I spend the majority of my evenings working on Statiq either directly or indirectly, which I do because I want to and I believe in what I'm building. That said, I also don't think it's unreasonable for me (or anyone) to ask for a tiny bit of participation in any commercial value that's derived from all that work. More generally, I think that's true for the entire open software community and part of what I'm attempting to do here is lead by example with the hope that if enough people do, we can normalize this way of thinking for developers and projects where it's appropriate (I also still believe in permissive licensing FWIW and have many MIT libraries I maintain). This model is also closest and most directly related to commercial activity, which I like. I want personal users, non-profits, etc. to be able to use the tool for free. I've experimented with donations for years and short of a handful of generous users that model just doesn't work in any meaningful way. Selling services or support assumes the additional time to do so is just sitting around idle (it's not, at least not for me). Selling modules or other common-core approaches spreads the burden of funding across users who want specific features rather than tying it to commercial gain. Finally, user adoption has never been a metric I care much about - I'd much rather focus my measure of project success on quality, feature set, and user satisfaction. If the number of users grow because I got those things right, then great. If not, or if I loose users for one reason or another, I'll be disappointed but the project will go on.
MarkZither
@MarkZither

hi @daveaglick i have half converted my blog from Wyam to Statiq but am a little stuck with the preview. looking at discoverdotnet i used a similar build.cmd which builds ok, but when i pass in build -target preview i get

  Restore completed in 62.26 ms for C:\...\discoverdotnet\src\DiscoverDotnet\DiscoverDotnet.csproj.
  DiscoverDotnet -> C:\...\discoverdotnet\src\DiscoverDotnet\bin\Debug\netcoreapp3.0\DiscoverDotnet.dll
  DiscoverDotnet -> C:\...\discoverdotnet\src\DiscoverDotnet\bin\Debug\netcoreapp3.0\publish\
Error: Option 'root' is defined but no value has been provided.
       -target preview
         ^ No value provided

any hints to fix this?

seems build preview does the job
Dave Glick
@daveaglick
@MarkZither Nice! Glad you were able to port it directly given the Wyam recipes haven't made it over yet. Statiq has a much more powerful command line interface (with lots of extensibility), but it's not quite compatible with the Wyam CLI - build preview is probably what you want
Beat me to it by a couple seconds :)

Note that in Discover the build command is actually provided by this `build.cmd' file:

@echo off
cd "src\DiscoverDotnet"
dotnet publish
if %errorlevel% == 0 (
  bin\Debug\netcoreapp3.0\publish\DiscoverDotnet.exe %*
)
set exitcode=%errorlevel%
cd %~dp0
exit /b %exitcode%

I've gotten fond of dropping one of those in every project. Essentially it changes the working directory to where the Statiq project is (I usually put mine under a src folder, but if you put your Statiq project right at the root you wouldn't need the cd ... step in the build.cmd since you're already in the project directory). Then it runs dotnet publish and then runs the Statiq app from the publish directory. You can often skip the dotnet publish step too if you want and just run dotnet run -- preview, etc.

The %* syntax passes whatever you put on the CLI for the build.cmd through to the DiscoverDotnet.exe (or use dotnet run -- %* if you go that route without a publish step)
MarkZither
@MarkZither
cool thanks @daveaglick, yes i copied most of the structure and pipelines from discoverdotnet to keep my questions easy to explain. I'll hopefully put up a blog post or 2 when i am finished in case anyone else is interested before the recipes are available. Still a fair bit to do like the tags page and paging the archive and adding the search, but between the old pipelines and the discoverdotnet repo i think i'll get there over the Christmas break.
Dragon Mastery
@DragonMastery
Are there any videos showing how to use this?
bitbonk
@bitbonk
Can I use Wyam to generate documentation in PDF form?
If so, what tech is it using, wkhtmltopdf?
Dave Glick
@daveaglick
@DragonMastery Unfortunately no videos yet - I may try to do a video tutorial series for Statiq once it launches as 1.0 next year if it sounds like there's interest in that
@bitbonk There isn't an in-the-box way of converting the docs to PDF right now. I've got an open issue for that but haven't even started to think about it yet.
Steven T. Cramer
@StevenTCramer
@daveaglick what is progress on the Dave Glick cloning project? LOL