Gyula's blog

and stuff

Global scss in SvelteKit

TL;DR Run: npm i -D nodemon concurrently Add the following npm scripts "dev:full": "concurrently --kill-others \"npm run scss:dev\" \"npm run dev:nodemon\"", "dev:nodemon": "nodemon --exec \"npm run dev\"", "scss": "sass src/scss/:static/style/", "scss:dev": "sass -w src/scss/:static/style/" Add npm run scss && before the build, package, preview and prepare scripts "build": "npm run scss && svelte-kit build", "package": "npm run scss && svelte-kit package", "preview": "npm run scss && svelte-kit preview", "prepare": "npm run scss && svelte-kit sync", The setup So I started a little project (hopefully I will write about it soon) and I tought I would write the frontend in svelte

Automating the Blog... again

Unsurprisingly, less painful Github actions are wonderful, love the integration, and you can find pretty much everything you need on the marketplace. The workflow is almost the same: Checkout Get Hugo Build with Hugo Rsync you can check out the yaml here Differences I don’t need to keep a Hugo executable in the repo, there is an Action that gets the latest version for me. I can keep the ssh key in a repository secret instead of the janky encrypted file that I used before, there probably was a way with Travis, but nothing quite as simple


It started with a youtube video And as usual it spiraled out of control (took me a lot of time to update the blog) So I made the repo as the video showed, then I realized I like having as close to a single command as possible So I started up on an install script, then I remembered that dotbot was a thing Why reinvent the wheel? So I didn’t… Mostly I wasn’t particularly satisfied with the shell module, what I wanted to do with it was a bit more complex than was elegant with dotbot.

Making My Own Theme

So the theme i used until now was Blackburn, it was nice, but the background was just too white for me. Now you might say that i should just override the theme’s CSS and be done with it, but I don’t have that kind of aesthetic sense. I really should have. But here I am, with a new template, that I built, almost from scratch, so let’s see what I learned in the past few days.

My Experience With Tracking by $index

If you found this post while trying to optimize your angular templates, I have a cautionary tale for you. This might be just me, but this one hurt. At work we have an AngularJS application. This application has one particular list really long, really complex, really grinds the tablets to a halt. How do you solve that? My first tought was, there is too many watches in there. One-time bind all the things.

xkcd Calendar Fact Generator

So it started with the new xkcd today, I tought “this is easy, I’ll be done in an hour”. Then I went down the rabbit-hole that is customizing Hugo. But first the generator You can check it out here The application itself is rather simple, it is carried by two functions, calling each other. The first, taking an array, and making a string out of all it’s elements function pickOneOfEach (arr) { let result = '' for (let el of arr) { if (Array.

Automating the Blog

So today after a long while I finally got around to automating the deploy of the blog. Tough not the way I initially thought. The first idea was to install Hugo on the server and have it periodically pull and rebuild the repository Then I remembered Travis CI. I quickly looked it up, and saw that I was not the first to think up the idea (no big surprise there), so let’s see what we can find.

First Post

So for the first post on my blog I will tell you about my experience with Hugo Setup is simple enough, just follow the instructions on their get started page. If you are on Windows I recommend installing with Chocolatey A lot less painful on Windows than Jekyl, as you don’t have to mess around with installing ruby Last time I tried to set Jekyl up I was messing around for about 3 hours, comparatively this site was about 1 hour, from deciding to set it up to this post