Blog

My First Website

I wanted to create a website for a long time and after more then ten years of not looking further into it here it finally arrived. There is still a lot to do but it's in a suitable state.

Tools

After testing some online website builder like WordPress and Wix I decided that these tools don't offer the flexibility that I want. I randomly stumbled about GitHubPages (I have a GitLab which offer the same service) which solved one of the biggest hurdles for creating my website ten years ago: I didn't know where I could host it.

Flask

Having no clue about it and being to lazy to do my research I clicked a thousand recommended projects of the GitLab Pages examples. After spending up to 10 seconds on these sites I choseFrozen-Flask because it is written in python which I feel most comfortably with. And now I'm stuck with it 😅 I guess there are easier Static Site Generators out there, but hey, I learned a lot more than I would have otherwise. So I learned a bit of templating with Jinja, unwrapped my old knowledge about HTML and CSS and realized why I never got past building a landing page: It's more complicated than you think.

Styling

To make matters worse in the chaos I decided to use Bootstrap because everyone who is cool uses it. I still don't know what I'm doing with it, but it is mostly layouting the page. Because I'm lazy in writing and I want to keep the work I put into the project in the future to a minimum I didn't want to pollute all the html with the CSS classes. So I mostly copied the bootstrap CSS in my own CSS and changed the classes with the html tags. I created a lot more styling on my own to make everything looking nicely. But positioning in CSS will always be a mystery to me. It takes me forever to get the thing where I want it. And then there are mobile devices! If you're using one right now, I'm sorry if something doesn't look nice. In the far future I will try adapt to the latest revolution on earth.

I switched from CSS to SASS (Syntactically Awesome Stylesheets) which is CSS in slightly less worse. The core is the same but SASS is so much less burdensome to write. At the end it gets compiled to CSS.

JavaScript

I finally learned some rudimentary JavaScript skills. It doesn't do much and still it drives me insane. I guess that's why it's disliked widely. I'm using nanogallery2 for my gallery and Plotly for displaying my data

Content

After the website was working and finally looked good enough for me I realized that html is a tedious language to type. Even with all my work in foresight of that and styling almost everything directly in CSS. I desperately wanted to get a automated table of content. Some more research, finding out how SSGs normally work, trying to find some nice markup, I landed at markdown. It works with python, I know it a bit from GitHub and MediaWiki. Right now it still doesn't satisfy all needs but it's flexible, expandable and generates a perfect table of contents on the right if you're not on mobile (Maybe you're lucky and I added it already).

Compatibility

I'm developing with Firefox so the website works there for sure. Furthermore I'm checking Chrome because it has by far the biggest market share. Testing on mobile I'm limited to Samsung Internet and sometimes I get my hands on an IPhone. Mobile experience is not the best yet but the important stuff is working. For Internet Explorer and Edge the JavaScript is not working correctly which results in no displayed plots which is annoying because I added picture of the plots for people without JavaScript. So please don't use Microsoft browsers and get on a computer with an up to date browser for a good experience.

Conclusion

Coming back to creating my own website was an interesting project. I have a nice platform for my thoughts, projects and pictures. I think just for putting some content online there are easier ways to do it but I learned a lot and have a lot more to learn.