week of 31 aug

31 Aug 2020

01 sep

Still working on the Vue version of our new site, I swear! It had to be put on hold because of BUNCH of new projects came down the pike (thanks, covid!), but it continues!

I really want the students to be able to take part in this new build, it will be VERY helpful for me and really great for their experience! In order for them to contribute, I need to make sure we’re all working with the same environment and tools. Docker to the rescue!

Thankfully, I don’t have to reinvent the wheel on this. Some people who are no doubt smarter than me already created a docker image for headless WP with Vue/nuxt: wuxt

This image is a bit out of date, so I of course thought it would be great fun to tinker with it and see how badly I could break it. :joy:

Once I got the container up and running, installed WP, and made sure the front end was loading, I started messing with the nuxt install. Here are my notes.

Upgrading nuxt inside wuxt container

04 sep

More updates to the wuxt container! Since we have our new plugins in its own repo (thanks to Jared!), I decided to add those to the wuxt container as a submodule. This way, I won’t have to manually update them when something changes, I can just pull them in via git fetch, which will be very useful!

Adding submodule to wuxt container

Many thanks to this working with submodules blog post

It should’ve been as simple as git submodule add https://github.com/<user>/repo ua-lib-cpts, but the wuxt .gitignore file was ignoring the plugins directory, so it wasn’t that simple. I updated the .gitignore to ignore only the three standard plugins (akisment, hello dolly, index), then ran the submodule command again.

I opened up the wuxt WP backend (localhost:3080/wp-admin), and activated the plugin. Everything is there!

Time to start adding the nuxt/vue files I’ve created. :tada: