loader image

Azaber Portfolio

azaber logo

Vaservah SSG Blog

A statically generated blog that connects to WordPress’s REST API. I am using Angular and Angular Universal for the prerendering.

Tech stack

The Goal

To create a blog for my friends and I to post updates about our Minecraft world. I saw this as a great opportunity to put my Angular skills to the test and also delve into Static Site Generators.

Derek 1

Challenges

This was my first serious Angular project so I knew there would be some hurdles.

With WordPress I needed to get “Better REST API Featured Images” and “REST API Featured Image” plugins so I could access the featured images from posts and pages. I also needed “Whitelabel CMS” and “User role editor” so I could setup accounts and permissions for my friends to make posts as easily and securely as possible.

With Angular I first had some issues with the prerendering, only the home page was being prerendered. I then found out it was because I did not generate modules for other pages. After doing this the issue was fixed.

I had one issue with GitHub pages where the links wouldn’t work because GitHub always prepended the project name to the URL. Because of this I just chose to upload it to netlify.

What I learnt

This was a great dive into Angular for me. I now understand why so many people say it has a higher learning curve compared to libraries like React or frameworks like Next JS and Vue. 

After lots of trial and error and patience I managed to wrap my head around these concepts like how to effectively use Typescript (instead of just having everything as an “any” type), dependency injection, modules etc.

The Result

I now have hands-on knowledge of Angular fundamentals and an SSG blog that is connected to WordPress.