Up And Running

Ok, I finally have a blog engine up and running again and while I know this still needs a ton of stying, I am kind of excited to have things going. This will probably start off as just a place for me to keep my notes so that I don't have to keep copying them from one notes.md file in a github project to another :)

The technology I have gone for on this new blog engine is the following:

  • .NET 8
  • Blazor web app (some will be the new default server side rendering but some will also be using WebAssembly)
  • Using TailwindCSS for the styling (or at least when I actually get some styling going, right now I can't say this is a great advertisement for Tailwind, but ideally it will be eventually)
  • Sql server for both local development and deployed db
  • I am also using Markdown as my main editing style, so am definitely gonna have to play around with some things with Tailwind so that I can make sure elements still look good even when I can't control the styling explicitly through css with markdown

If all goes right, I will be making more frequent updates to this blog (both through code and through posts). For now I will just wrap this up and make sure it posts correctly, but so far so good I think.

How I Publish

Ok, so in order to get this published out to my server, I am utilizing simple FTP and some basic command line skills.

  • npx tailwindcss -i ./styles/site.css -o ./wwwroot/css/site.css --minify (for publishing out the css - which yes, I know, it is seriously lacking there)
  • dotnet publish -r win-x86 -o ./publish --self-contained (for publishing out the site - still want to figure out how to publish this out trimmed, but ran into an issue where not everything seemed to get published out when I did that - things to look into)

For local development, since I'm developing completely on a mac

  • Open the solution with Rider
  • dotnet watch run -lp https (works well with hot reload)
  • npx tailwindcss -i ./styles/site.css -o ./wwwroot/css/site.css --watch (for the styling elements)
  • docker run --rm --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=P@ssword1!' -p 1433:1433 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge (for my arm based sql server instance)

The code also lives up on github in a public repo so anyone is able to take a look at it. Since this is just a little side project for myself as I explore with Blazor Web Apps, I probably won't take any PR's or feature requests, but feel free to fork it, completely copy it, or do anything else you would like with it. My goal is to eventually add comments, image management, more styling (obviously), etc to make it a more built out engine.

Explorations with Blazor

It appears I will probably have to add some logging since I am having more issues than I usually do while hosting this on my current hosting provider. Nothing I am doing is all that fancy, though, so I wouldn't expect hosting providers to have anything do with the problems I am seeing. In particular, I seem to see that I lose my auth connection more frequently with this current provider and I'm not sure what is causing that. It also seems that when I have a web assembly blazor component, I am getting the "something went wrong" dialog more frequently and I'm not sure why. Guess that will be a project for tonight.

It would appear my hosting provider has a 5 minute timeout for idle sessions, which means if it is gonna take me longer than 5 minutes to write up a post, I will need to remember to save my work often. Maybe this would be a good feature for me to add to my editing experience and have my application save my progress periodically. This would allow me to avoid losing work, as well as keep the server thinking that the process is not idle, Sounds like a win/win to me ;)

Progress thus far

Ok, so as a follow up here, just for my reference, I actually didn't need to add anything to periodically save my progress (yet). It appears that my issue was around the Data Protection keys and so all I had to do was enable the "Load User Profile" in my application pool and thankfully that was something I was able to enable. At first I thought I might have to figure out how to persist the keys to the file system, but apparently toggling this switch solved the problem and was much easier to implement.

Looks like I do need to make this thing way more mobile friendly and I would like to add some features to the editing side of my posts as well, but I must say that things are working out a little better than I was expecting. Trying to create this post from my phone was a bit challenging and I ran into the good old "Oops something went wrong" error when I first tried to bring up the admin side, but a quick reload seems to have fixed things.

On the road again

Well, guess this is totally non-technical, but have been having a great time road tripping in my motorhome for the past couple of weeks. I was blessed that about 2 years ago my parents let me have their 40 foot motorhome when they didn't want it anymore and now this is my first big voyage with it. The initial trip was to head out and see my girlfriend's brother in Michigan and since that was the "goal" for that first leg, we pushed it pretty hard by driving 500+ miles for the first 3 days which left us just under 500 miles for the last day. That journey took us through WA, ID, MT, ND, MN, WI, and finally into the Upper Peninsula of MI. We ended up crossing the Mackinac Bridge that took us from the Upper Peninsula to the main part of Michigan which was quite an initiation experience for me. I pretty much white knuckled the whole way across, but thankfully my passengers didn't notice and they enjoyed the journey. We are now on our way back which is gonna take us through MI, WI, MN, SD, WY, MT, ID, and finally back to WA.

An unhandled error has occurred. Reload 🗙