Earlier, I mentioned rebooting GPORG AGAIN. This has happened. The reason for this was…a very long story.

Basically I tried to make changes to the CSS. I saw something that needed fixing (don’t even remember what). I made my change and tried compiling it with Webpack…

I found a ton of errors in the console. This has never happened before. Then I remembered I mass-updated a bunch of packages via Homebrew, and some of the packages that Roots Sage uses were probably affected, creating compatibility issues. I’m not too savvy with this sort of thing. Literally, all I know how to do is compile, install and remove packages and that’s pretty much it.

I checked out my own local install of GPORG, and found PHP errors all over the site. I don’t remember if I updated PHP to v8.1 because of this or because I ran into another problem and I figured upgrading would fix it.

So I decided to start over! ?

I set up an entirely new Wordpress install with Bedrock, since for some reason, I was still getting PHP errors, even with a new Sage theme. So maybe the issues extended all the way to Bedrock as well.

So new Bedrock and new Sage. They already released Sage 10 (I was on 9 previously), and it’s very different from v9.

  • The dev environment—previously on v9, in order to compile while developing, you would do yarn build in the command line. Now, it’s yarn dev, which will not only run constantly in the background, it’ll automatically compile and optimize images for you as you add/update things.
  • Production environment—yarn build was previously used for dev environments and yarn build:production was for production. Now, yarn build is used for production.
    • Sidenote: if you’re using the Nova editor, you can set up tasks under Project Settings. You can call the task ‘yarn’ and under the Build tab, put yarn build and under the Run tab, yarn dev. This way, you can easily compile using the icons at the top of the editor.
  • The folder structure for assets went from resources/assets to just resources. The /images, /styles, /fonts, etc folders are just under resources, along with /views.
  • Compiled assets went from /dist to /public.
    • Note: when adding background images through CSS, the compiler starts looking for images in /resources, so when you reference them in your CSS, add them as ../../images/{filename}, and you won’t have to deal with broken images.
Project settings window in Nova editor
Project Settings window in Nova editor, showing how the build and dev tasks are set up.
Task buttons in Nova editor
The task buttons in Nova editor with the tasks set up. I’ve set it up to have the hammer do yarn build when clicked and the play button do yarn dev when clicked.

And the other non-Sage related thing??

I’ve been using Github a lot lately for certain projects. I just randomly found that dependabot comes with every GH repo—you just have to enable and config it. I’m subscribed to animate.css GH notifications, where they get dependabot pull requests about once a week or so, so I know how they work. What I like is that it will automatically resolve any conflicts for you, which probably would’ve helped me avoid the situation that kicked off this reboot. ?

FYI, remembering to commit as an ADHD person is not easy. I use Nova editor’s built in git client, so I can see easily when something needs to be committed, just as long as I have the git icon in the sidebar selected. On the other hand, it’s really easy for me to go down the code rabbit hole if I’m hyperfocused on something that I forgot git even exists. And when I finally do…I’ll have like 10 edits waiting to be committed. ? Of course, with version control, you can’t just commit all of them with the message “Did a lot of stuff” or something generic, in the event you need to revert something. So I have to go through each edit and try to remember why I did this. For this, I use a separate git client so edits in the same file can be split into separate commits.

Also another reason why I like Nova’s git client, it shows me the context of the edits I made. Fork shows me what was added and removed, but if there are a lot of edits in a single file, I’m just sitting there, thinking, ‘what did I do here?’ So I use them both at the same time for big stuff like this.)

(All of this would’ve happen assuming I didn’t see the 10+ edits waiting to be committed, paled and stuck my head in the sand so to speak and continued coding, so I instead have 20+ edits waiting. ?)

More misc. stuff

Also took the opportunity to completely refactor the overall structure of the site, including how the sidebar is displayed, how the mobile menu button animates, etc, and a billion other behind the scenes coding. Also renamed the blog “landing pages” (Words > Blog, Photos > Photolog, Status Updates > Microblog)