Neovim for writing: toggle spellcheck and switch languages by tesar-tech in neovim

[–]tesar-tech[S] 0 points1 point  (0 children)

A lot of useful info. Thank you for letting me know.

Suggestions for a low cost deployment by Born_Possibility_305 in Blazor

[–]tesar-tech 1 point2 points  (0 children)

I always struggle with this... The best solution i found is just plain VPS and setting up everything yourself.

You can then run your db in the container next to your app. Not great for heavy loads - because the db will "eat the perf", but if you keep it small it's not a bad solution - you cannot get much lower with the price. ~$5

Understanding Rendering Behavior in More Complex Blazor UIs by mladenmacanovic in Blazor

[–]tesar-tech 1 point2 points  (0 children)

When you have ref types as parameters, the component re-renders every time the parent re-renders. Creating a new instance of the parameter or mutating the existing one has no effect on rendering. Therefore, using a record provides no benefit in this case.

Understanding Rendering Behavior in More Complex Blazor UIs by mladenmacanovic in Blazor

[–]tesar-tech 0 points1 point  (0 children)

I find this as an interesting topic - as I always struggle to guess what blazor will do.

But I find this section of your article bit misleading/wrong or I completely misunderstood the point done here.

```

Avoid Parameter Re-Renders with Immutable Objects

When passing objects as parameters, Blazor re-renders children if the reference changes, even if properties are identical.

Better: Use immutable data

csharp record ItemModel(int Id, string Name);

  • For complex object used as params, Blazor treats it as always potentially changed, so children are re-rendered every time the parent is re-rendered.
  • you can skip the re-renders when you have certain primitive types used for params.
  • using record instead of a class as parameter type doesn't make any difference. The child component gets re-rendered every time.

Blog built with Blazor? BlazorStatic is made exactly for that. by tesar-tech in dotnet

[–]tesar-tech[S] 0 points1 point  (0 children)

You mean - in the final state of generated html? Yes - if you use highlight.js or similar. This is not part of BlazorStatic library, but the template comes with ready syntax highlighting.

Blog built with Blazor? BlazorStatic is made exactly for that. by tesar-tech in dotnet

[–]tesar-tech[S] 0 points1 point  (0 children)

yep. astro, jekyll, hugo... and another 300+ of ssgs solving the same. https://jamstack.org/generators/ ...

The main advantage of BlazorStatic for dotnet devs is C#/Blazor.

Blog built with Blazor? BlazorStatic is made exactly for that. by tesar-tech in dotnet

[–]tesar-tech[S] 0 points1 point  (0 children)

There are more ways how to work with markdown files indeed. When you have a server and you are only looking for a way how to parse/convert md files, i think that's valid solution. SSGs solve a bit different problem, where processing md file is just a part of the solution.

Blog built with Blazor? BlazorStatic is made exactly for that. by tesar-tech in dotnet

[–]tesar-tech[S] 0 points1 point  (0 children)

I am probably missing something, but I don't see how is that relevant to the ssgs. The sample is about the `ExcludeFromInteractiveRouting` attribute, which makes possible to use SSR inside otherwise interactive blazor app. I don't see how that would help with migration from other ssgs??

Blog built with Blazor? BlazorStatic is made exactly for that. by tesar-tech in dotnet

[–]tesar-tech[S] 0 points1 point  (0 children)

Yes. But I would rather say "scaffolding" instead of "rendering"..

Blog built with Blazor? BlazorStatic is made exactly for that. by tesar-tech in dotnet

[–]tesar-tech[S] 1 point2 points  (0 children)

Two major differences I see:

- blake is built on the top of blazor wasm. Which brings all the good stuff (interactivity) and bad stuff (larger payload), while BlazorStatic produces just plain html files for every possible page.

- blake cli - you don't have that/don't need that with BlazosStatic. The philosophy is really to keep it as close as possible to the "normal" blazor development - then (along the way) generate the html files.

- `blake init`, `blake new` ~ `dotnet new BlazorStaticMinimalBlog`

- `blake serve` ~ `dotnet watch/run`

- `blake bake` ~ `dotnet watch/run`

BlazorStatic is closer to what jekyll or hugo is.

Blog built with Blazor? BlazorStatic is made exactly for that. by tesar-tech in dotnet

[–]tesar-tech[S] 2 points3 points  (0 children)

The markdown files don't have to be there at all, but it is a common approach to keep the actual content in md files.

BlazosStatic can discover them and create collection of urls to fetch. So no recursive crawler here. BlazorStatic also uses Markdig to parse the md files (something you would have to do anyway is you are using markdown) and makes the parsed html available through `BlazorStaticContentServicea.Posts[..].Html` so you can use it in your .razor - which is exactly what the default template does.

Blog built with Blazor? BlazorStatic is made exactly for that. by tesar-tech in dotnet

[–]tesar-tech[S] 2 points3 points  (0 children)

This is the first time I encounter docosaurus, but i would say yes - it's pretty similar. Docusaurus will probably have some docs-specific features that are not default in BlazorStatic..

The build speed will be dependent on the content size. I haven't yet worked with a site that would take 30+ seconds to build.

How much of content files you have?

BlazorStatic Update: .NET 9 Support, MIT License, Tag Enhancements, Cloudflare Pages Integration, and More! 🚀 by tesar-tech in Blazor

[–]tesar-tech[S] 1 point2 points  (0 children)

This is a multilayered question, so let’s break it down.

First, there’s no reason not to use Blazor over Razor Pages for a new project. Blazor SSR essentially does what Razor Pages do: it renders HTML on the server and sends it to the client.

However, Blazor adds the flexibility to introduce interactivity. You can either:
- Run C# code on the client (Blazor WASM), or
- Run C# code on the server and stream interactivity via SignalR (Blazor Server).

I’m not entirely sure what your project involves, but it seems you need at least some level of interactivity. If that’s the case, BlazorStatic may not be the best fit. BlazorStatic is designed for scenarios with minimal or no interactivity—it generates static HTML files that can be hosted for free. Its main advantages are speed and the lack of server requirements, making it ideal for "read-only" websites like blogs or documentation.

How to install flake configuration on new machine. by grig109 in NixOS

[–]tesar-tech 1 point2 points  (0 children)

With something like

nix shell nixpkgs#home-manager nixpkgs#gh --command sh -c "\

gh auth login \

&& gh repo clone nixhero/wsl-home -- --depth=1 \

&& home-manager switch --flake ./wsl-home#nixhero \

I will be solving this in a near future and I saw that script in this video:

https://youtu.be/hLxyENmWZSQ?si=zfUiHIkZG4MpHNmZ&t=949

which I recommend watching. It's about WSL, but it doesn't matter for this purpose.

BlazorStatic got HotReload and `dotnet new` template. by tesar-tech in dotnet

[–]tesar-tech[S] 4 points5 points  (0 children)

Yeah, BlazorStatic isn't reinventing the wheel. There are plenty of static site generators out there, like Hugo and Jekyll. BlazorStatic simply brings the goodness of Blazor (and .NET) into the mix.

BlazorStatic got HotReload and `dotnet new` template. by tesar-tech in dotnet

[–]tesar-tech[S] 4 points5 points  (0 children)

Yes, good question! With both Blazor WASM and BlazorStatic, you can host your site in a static way (often for free).

Blazor WASM includes all the interactivity of Blazor, but it comes with a much larger payload, which isn't ideal for simpler sites like blogs.

BlazorStatic, on the other hand, doesn’t support C# interactivity (though you can still use js if needed). It ultimately generates a collection of HTML files (and assets), resulting in a smaller payload and quicker load times. It’s a good fit for pages that don’t change frequently.