It’s been nearly a year since I relaunched my personal website and I’m still back-filling blog posts. I haven’t spent as much time on it as I’d like to, but I’m pretty happy with how the WordPress API has worked out. When I started working on my site and the API was in beta, there wasn’t a whole lot of documentation or examples on how to use it. But I realize that APIs exist so you can do whatever you want and it’s really up to you to figure out how you want to use them.
As always, I would’ve done some things differently if I were doing it now. The single function that handles the URL parameters and does an AJAX post to get the data works well, but I probably should use a JavaScript templating engine like instead of building HTML strings to display the posts. It’d be easy enough to convert it now, but I don’t know if it’s worth the time and also the resources of including another JS library like Mustache. I also would’ve started by using ESLint to format my JavaScript consistently. Again, this is something I could easily do now and fix whatever it doesn’t like with my code.
But overall, I’m still pleased with how it’s working and the overall design. I just need to catch up on posts so I can write some in the present for once. Hopefully I’ll get some time over the holidays.
