Web Design !
!!! Tech Discoveries !!!

All the cool little things I learned, now YOU can learn them too!

New How To Keep Your Hugo Site's Content In A Different Repository

I use vim as my primary editor for everything related to code. But when it comes to writing blog posts, I don’t always use vim. In fact I don’t always use my laptop. I resort to a Markdown-Editor that is available on all my devices and has basic git-capability, so I can push it to a remote repository.

But how do I get the files from this repository into my blog?...

Divider

Hot About GitLab Caches and Artifacts (and which to use for node_modules)

When you deploy a NodeJS application with GitLab, one of the first steps is the installation of the dependencies. Many subsequent pipeline jobs will depend on the installation result, which is thenode_modulesfolder (or several folders).

GitLab jobs, however, runs completely independent from each other and don’t share any resulting output by default. So how can subsequent jobs use thenode_modulesfolder?

In GitLab there are two ways to hand over files to other jobs:ArtifactsandCaching. Here are some of the basic characteristics....

Divider

A Number of Things about Gitlab Ci and Npm

Recently I had to add a semi-complex TS application to quite-complex GitLab CI/CD pipeline.Here are a number of resources that helped me understand some of the peculiarities of running npm inside GitLab:

  • GitLab Cache and Artifacts explained link
  • A StackOverflow post on npm/GitLab link
  • GitLab docs: How to use references... link
Divider

npm config and Workspaces

npm workspaces can be a handy thing: They’re a small, under-appreciated feature that let’s you create a simple mono-repo with a single entry in yourpackage.jsonfile.

There’s one thing that recently got me confused though: I had one app inside a workspace that used a custom npm registry. I tried to set the registry url using a local .npmrc file but it didn’t work. Had I looked more closely I would’ve seen the littleENOWORKSPACESmessage. Turns out npm ignores the local config if there is a different setting for the whole repository. I think it kind of makes sense due to potential conflicts in the overall mono-repo....

Divider

How Hugo Server Treats The BaseURL setting

I was just wondering why my RSS URLs don’t work in the deployed version of this site. All Feed Links were pointing tolocalhost:1313instead of the baseURL set in myhugo.tomlconfiguration file.

Turns outhugo serverignores thebaseURLsetting. The reason, I assume, is that hugo server is used as a dev server and you shouldn’t have to point your configuration tolocalhostwhile developing and then switching to the live URL when deploying....

Divider

About Podman Quadlets

If you run your containers in production it makes a whole lot of sense to tie them into systemd. It’s incredibly easy to do. This is an excellent blog post that tells you how to do it:

Quadlet: Running Podman containers under systemd.

Divider

Hugomods Container Images and rootless vs. non-root

This blog is powered by theHugo static site generator. I run this Hugo installation in a rootless podman container. While looking for a fitting container image (so I don’t have to maintain my own) I found thehugomods docker images. They have a ton of images to run Hugo for all kinds of environments. I found various images taggednon-rootand thought: Bam! That’s what I’m looking for! I was pretty surprised that it didn’t work. Instead this (simplified) podman call would give me a permission error:


          # Example Podman command that failed
          podman run --rm -v $(pwd):/data hugomods/hugo:latest hugo --minify
        
Under Construction

More details coming soon!

Under Construction Something Else I'm Working On!

This section is currently under construction. Please check back later for more cool tech insights!

Construction GIF

Divider

Sign My Guestbook!

Notepad Feel free to leave a message!

Email Me Or send me an email!

Divider

Under Construction New! Generate your own 90s page here! Under Construction