I am unhappy with the asynchronous loading on the home page. The main content of the page should be immediately visible. Sending a second GET request to the server from the client for the latest blog post is clunky, and screws up a mobile device's rendering of the page.
I am considering remaking this site as a Node application, or inserting PHP here and there where I want to compile a page server-side. I'll first try getting the PHP to work.
Here's what I think I need to do:
- Stop working in production and start coding in my dev instance.
- Make a serverside GET request from houseofthemagus.com using cURL to ghost's API on blog.houseofthemagus.com. (I'll need to get the CORS headers to work properly since this is a cross domain request. And I think ghost's oAuth documentation should help with that.) Respond to the data returned from ghost, and compile the page, and respond with it to the client's initial request.
- Deal with issues as they come up until the thing works.
- Assess whether this is any better than what I have now. At the least I'll have learned a bit more about web development during the process.
Eventually I will probably build my entire website as a node app instead, but I do need to focus on one thing at a time. And right now my focus is client-side development.