Blogging Setup: Workflow for writing a new blogpost

Creating a new blog post using the previously describe setup should be easy and comfortable. These are the generic steps for adding a blog-post.

  1. Create the content in org-mode: Open any org-file on the computer and write a blogpost.

    • Any existing org-mode heading could be turned into a blogpost, but most generic notes dont make for a good blog post. Some of them can be a good basis though.
  2. Tag it so i can find it again later: Tag it with “blog” so I can find it through the agenda. Enables me to list how much time i spend blogging in a week / month / year.

  3. Create hugo variable placeholders: Navigate to the headline and press `M-x hugo`

  4. Fill in the hugo variables. An example is below:

    :PROPERTIES:
    :TITLE:    Setting up the blog
    :HUGO_TAGS: emacs blogging
    :HUGO_TOPICS: emacs
    :HUGO_FILE: setting_up_the_blog.md
    :HUGO_DATE: [2017-08-15 Di 22:14]
    :END:
    
    • It is hidden in an org-mode drawer which makes it easy to hide
  5. Convert the headline into a markdown file according to the hugo variables: Navigate to the headline and press `M-x hugo`

  6. Regenerate the website including the new markdown file: Open a shell (I use git bash on Windows), navigate to the blog directory and execute `hugo`

    • Optional: Debugging, check the blog post formatting before uploading it
    • For this execute “hugo server” and navigate to the local blog
    • Downside: pictures dont get resolved correctly
  7. Publish the website

    cd public
    git add * && git commit -m "site update" && git push origin master
    
comments powered by Disqus