Very basic .NET library to help with simple code generated static HTML pages.
$ dotnet add package peSHIr.WebThis library contains some code that could help with very simple code generated static HTML content.
My name is Jarno Peschier. I started programming on a Commodore 64 in high school, got a masters degree in Computer Science at Utrecht University at the end of the last century, specializing in GIS algorithms, and I have been developing software all my professional life.
You might also know me by my online name of peSHIr, which is basically the way you write my last name phonetically in Klingon.
At the start of 2025 I worked as a software engineer at Dutch engineering firm Iv, where I personally handled all software development around our scan vehicle (YouTube) using multiple third party software packages, C#, and PowerShell.
The laserscan and photo data Iv collects using this vehicle is used in infrastructure projects all over the Netherlands, but also for monitoring things like trees or quay walls in Amsterdam.
Call static methods on Html to generate small snippets of HTML markup that you can then string together to form HTML content from code.
using peSHIr.Web;
//...
string list = Html.List(["one","two"]); // should result in "<ul><li>one</li><li>two</li></ul>"
That's it, really.
Well, no.. One feature I think is kind of cool are the dynamic dates and timestamps:
<script> tag generated by Html.DynamicTimeScriptTag() in your HTML body somewhere.Html.DynamicDate().DateTime into your HTML content using Html.DynamicTime()Just be sure to supply the correct culture to any of the above methods, for either the format you specify for the default rendering of the dates/times in your HTML (things like names of months and such), but also for the language elements (like 'today', 'tomorrow', and units like 'hour(s)', 'minute(s), etc.) used in the dynamic formatting in the JavaScript code. In this last case you will get language elements as supported by peSHIr.Text.LanguageSupport (from our core package, or English when the culture is not yet supported there.
This library is available as a NuGet package on https://nuget.org. To install it, use the following command-line:
dotnet add package peSHIr.Web
This library is licensed under the MIT License - please see the LICENSE file for details - and makes use of Semantic Versioning to try and give meaning to the version numbers, at least for the non-prereleased stuff.
This library wouldn't have been possible without the following:
If you like what you see/use you could try one of these links to let me know: