nerdpress.org

7 Followers
23 Following
21 Posts
https://nerdpress.org - Blog about nerd stuff we do in and outside the office.
A WordPress-like More Tag in Astro | Nerdpress.org

When migrating from WordPress to Astro, one encounters various challenges.One is handling the WordPress "More" tag, which originates from the More Element in the WordPress Block Editor. After converting the WordPress export to Markdown, you will find `` tags in your content. These tags serve as delimiters in WordPress, allowing you to define

Nerdpress.org | ...dev, tech problems and solutions.
Dynamic OpenGraph Images in Astro | Nerdpress.org

If you've ever shared a link on social media, you know how critical OpenGraph (OG) images are. They're the first thing people see - often before they even click.Static OG images are fine as a start, but what if you want custom images for every blog post or content collection item? For Astro there is

Nerdpress.org | ...dev, tech problems and solutions.
5 Essential Plugins for Yazi File Manager | Nerdpress.org

Yazi is my preferred terminal file manager, and these are my five essential plugins that improve my workflow. The Yazi package manager ya will be used to install the plugins mentioned below, which is shipped with Yazi. For the installation of necessary terminal tools, I will use brew, since I am currently on OSX. For

Nerdpress.org | ...dev, tech problems and solutions.
Patch dependencies with composer-patches | Nerdpress.org

Sometimes, you may encounter a bug or an unwanted functionality in a PHP vendor dependency, and forking the package and maintaining upstream changes can be too cumbersome. In such cases, using composer-patches is a good solution. Composer-patches is a handy Composer plugin that applies diff patches to specific packages during installation. Basically, you store a

Nerdpress.org | ...dev, tech problems and solutions.
Typed Arrays with PHPStan types | Nerdpress.org

When dealing with legacy data, you often encounter arrays or associative arrays. These arrays are untyped, which PHPStan, of course, does not accept, resulting in numerous PHPStan errors. PHPStan, by the way, is a static analysis tool for PHP that enforces strict typing and checks for compliance with PHPDoc annotations, ensuring code is robust and

Nerdpress.org | ...dev, tech problems and solutions.
Deploy local build with Deployer7 | Nerdpress.org

Deployer is a great tool to deploy your PHP Project. Deployer executes a set of commands on the target server to build your project and enable the newly built version. A typical deployment process with Deployer involves SSHing into the target machine, where it performs a Git checkout of the project, installs dependencies via Composer,

Nerdpress.org | ...dev, tech problems and solutions.
Invalid table or database name mysql.sock | Nerdpress.org

In a development Docker setup, I needed to upgrade the MySQL database from version 5.6 to version 8. The data was stored as a Docker volume in a data directory. After the update, I encountered the following error: my_db.mysql | 2024-08-16T09:40:21.463770Z 2 [ERROR] [MY-010520] [Server] Invalid (old?) table or database name 'mysql.sock'my_db.mysql | 2024-08-16T09:40:21.468287Z 2

Nerdpress.org | ...dev, tech problems and solutions.
Symfony integration tests custom header is missing | Nerdpress.org

I am writing an integration test in Symfony with a request that includes custom headers. However, the request fails because the custom header is apparently missing. What happened was I forgot to add an HTTP prefix to the custom header. This is a common pitfall when writing integration tests in Symfony and using custom HTTP

Nerdpress.org | ...dev, tech problems and solutions.
Monorepo with NPM workspaces | Nerdpress.org

I recently converted a project into a Monorepo.I had a cli part and an Astro StaticSiteGenerator part. At some point I felt like these parts would be entangled too much so I decided to separate them. Since they were still related they should stay in one repo but have their own dependencies and separate processes.

Nerdpress.org | ...dev, tech problems and solutions.
Astro component for DarkMode Switcher for PicoCSS | Nerdpress.org

I am currently evaluating PicoCss V2 in Astro project. PicoCss is a CSS / SCSS framework I used for some of my projects because it is small and brings sufficient styling for most HTML Elements. It has integrated light and dark mode, but no theme switcher. So i was looking for one and found this

Nerdpress.org | ...dev, tech problems and solutions.