Jan 25, 2017 at 10:59 PM
Ok, this is pretty kick-ass. After about... a week and a half banging at this way too much for any sort of work/ play/ private development balance, I got the blogging app working for really basic publishing. In fact this post was put together and published using the new app (the page you are reading this on was rendered by the app.
So far what I have is a fairly basic 2 page app with the entry page having a few buttons that launch the new entry page or let you publish the page to the web server. I wound up spending a little time yesterday setting up the domain name and doing some NGinx configuration to get ready for being able to start pushing pages. Over the past couple days I've been quite busy.
I didn't actually have to set up a new server, I just added a new domain name and user to my existing Ogrehut.com server. The blog I send out is just HTML... no PHP, no Python, no Wordpress, just stock simple HTML. So the NGinx configuration was about 10 lines long, when I add more users it will have to get a bit more convoluted but in general should be super straight forward. The big win here on going with pre-rendered HTML is page loads are ridiculously fast. It almost feels like loading a native app. The page uses Bootstrap 4 Alpha and for the moment I'm just pulling it off their CDN rather than hosting it myself. Before the eventual publish date I'll switch to local hosting so I don't have to worry about the CDN dropping support for an older version.
Calling what I have right now a templating system is probably over-generous. I use a few simple hard coded tags and replace the text inline and for the moment new line characters are translated into HTML <BR> elements. I'm not even sure how the page is going to render the braces in this post! In addition to at least basic templating, my intention is to get Markdown support for the blog entries. I haven't decided how I'm going to render the markdown, it's likely largely dependent on how I do the templates.
One downside to blogging from iOS is it's more difficult to add code examples since I do all my development on the MacBook Pro. I've learned a ton in the past couple days though and I'm going to put together a couple posts with code examples of things which I found a little tough to chase down. NMSFTP was fairly easy to master, but I found few examples, particular in Swift so I'll probably post some examples from that.