A Few More Minor Details

After a bunch of screwing around in my hosting account and eventually a call to the provider, I finally was able to get this blog deployed! It’s sort of bewildering that sometimes even the simplest tasks, in this case FTP, can become burdonsome and time consuming. I never really figured out why I had all the issues… I ended up just creating a brand new FTP user account and using that instead.

Deploy to Web Server (continued)

Once I finally got the FTP thing squared away, I went back to VS Code to look at deploying the site using my liximomo SFTP plugin there. As I am really new to what I consider to be these new application file structures that are being generated by the tools I’m installing via NPM, it didn’t really occur to me that I’d have both source files and my generated public files that will go on the web server. Right now, my VS Code workspace is setup to via all my files initiated by Hexo, so using SFTP from here will not deploy to the correct file structure on my web server, and in the interest of what is becoming my mantra: avoiding rabbit holes, I decided to forgo the VS Code SFTP method, for now, and just push what I need to my server using a seperate tool–currently CyberDuck.

Current Process

I’m writing this out here to not only have a place to look this up for reference (probably tommorrow), but to possibly help push this into my brain a little better… maybe even remember it tomorrow ;)

  1. Navigate to the amen2that hexo directoy via the Terminal and type:

     $ hexo new "Title For My Next Post"
    
  2. This will create a Markdown file in my source/_posts directoy, which I can access using VS Code and write to my heart’s content.

  3. When I want to look at what I’m writing, I can run the blog in my localhost by running the following command:

     $ hexo server
    
  4. Once I am happy with my post and am ready to deploy it, I can do that by running generate command, which will compile my source files and generate my site in the /public/ directory. once I’ve don that, I’ll use clean, as it will clean the cache file (db.json) and deploy command, which will also push the public files toamen2that.github.io

     $ hexo generate
     $ hexo clean
     $ hexo deploy
    
  5. Lastly, I will want to push my public files located in my working hexo directory, ‘./amen2that/public/*‘ to my web server using whatever SFTP application I want… currently CyberDuck.

  • If I’m looking to write posts as drafts, which is referred to as a different layout in Hexo, I would use the following:

     $ hexo new draft "Title For My Draft Post"
    
  • If I’m looking to review my draft content locally, I can add the –draft flag

      $ hexo server --draft
    
  • Once my draft content is ready to publish, I can run the following to get it added to the _posts directory

      $ hexo publish draft "Title For My Draft Post"
    

Don’t Be an RSS Hole

Now I can’t honestly say I’ve ever done much with RSS, either generating or consuming, but since this blog theme has a link to RSS that is currtly not doing anything, I’m seeing an opportunity to learn something new. It’s a rabbit hole, yes, but I’m going to keep this initial exploration rather limited. I want to simply install the hexo-generator-feed plugin in order to generate this XML content. I will worry about what to do with it later, but I just couldn’t live with a link to nowhere in the short term.

Well, I’m back from creating my RSS2and Atom feeds, both generated automatically after installing that plug-in, adding a few lines to my config file, then starting up the hexo server. Piece of cake! So now that I’m out of that hole, what’s next?