My first Post

29/06/2021
C#Blazor

Welcome to my first post. This whole blog was written with Blazor and some nice css. In this post I will explain how the Blazor application works, what my motivation was and how to setup on your own.

blazor logo

Blazor ❤️

Let's start why I used Blazor. And then answer is surprisingly simple: I ❤️ it! I am mainly a backend developer and using C# also in the frontend is just a blessing.

I could create my own blog without a lot of code. That keeps it maintainable for me. Right now this is a "server" only version. Mainly because I reduced the complexity for me for some aspects. Maybe in a later release I'll switch to Blazor WebAssembly. With .NET 6 the performance also becomes better.

Why do you have a blog?

I was long thinking whether or not a blog makes sense. Over time I was more interested in actually creating an website for blogs rather than really writing. So I started coding. I didn't know where it gets me but I was sure I have learned something at the end.

How does it work?

I wanted to have an easy entry for writing blog posts. So no fancy WYSIWYG-editors. As a developer I'm used to write markdown. So why not using this for a blog?

Markdown gives all the flexibility to write well formatted posts including images, source code, lists, ... you name it. As there are multiple good markdown to HTML converter I didn't have to do this from scratch.

So the general idea is to create blog posts in markdown, which then get saved to a database (RavenDb, Sqlite, InMemory) and gets rendered on demand to HTML.

Code completion

Let's have a small look at the following example:


public void ThisIsMyNiceFunction() { }

At the time I am writing this (29. June 2021) there is neither syntax highlighting nor line numbers. So this will follow in a later release.

Open Source Project / Collaboration

The whole idea was to create a quite configurable software which anyone could fork, change some settings and it would work for her / him. If you want to follow / support just head over to my GitHub Repository.

How to use

The easiest way to use the software is to fork / download and adapt some settings. Mainly you have to change stuff in the appsettings.json

{
  ...
  "BlogName": "linkdotnet",
  "GithubAccountUrl": "",
  "LinkedInAccountUrl": "",
  "Introduction": {
    "Description": "Some text about you",
    "BackgroundUrl": "assets/profile-background.png",
    "ProfilePictureUrl": "assets/profile-picture.jfif"
  },
  "ConnectionString": "",
  "DatabaseName": "",
  "Auth0": {
    "Domain": "",
    "ClientId": "",
    "ClientSecret": ""
  }
}

You can provide some general information like the name of your blog, URL's to your social media and configure Authentication and the storage provider. Also in code there are some places which can be adapted (for example whether you want to use RavenDb, Sqlite, SqlServer or an InMemory-Db). But I'll explain that in detail on the Readme.md.

What to come?

For the blog itself I will write down my thoughts, tips, tricks, findings and this stuff (not necessarily related to software engineering). And for the software... well there is also more to come. My backlog is full of ideas. Right now only a minimal set of operations work. If I want to update a blogpost I have to go directly to the database 😄 .

Cheers Steven

5
An error has occurred. This application may no longer respond until reloaded. Reload x