Walkthrough on Blog Creation - Part 3

How to Create Your First Blog Post

In this last part, you will learn how to create a blog post on the site you have created. If you have not already installed Hugo on your operating system, please do so, as you will need to enter a hugo command from the Terminal.

Set up the draft

To create the directory in which the contents of your blog post will be stored, enter your project repository from the Terminal and type hugo new --kind post post/post-name. This command will create a new directory in post/ called post-name, which will be automatically populated with an index.md file.

From there, fill in the fields of your blog post, such as title, subtitle, and summary. The summary is the description of the blog post whhich appears in search results. In authors, place the keyword admin within the square brackets. This way, your name will appear as the author in the blog post. Insert strings of your choosing in tags and categories. If you do not want to publish the blog post immediately, you can set draft to true, and the blog post will remain unpublished until you set it to false.

Start writing

Any text that you want to write in your blog post must be placed after the triple hyphens at the bottom of the Markdown file. The triple hyphens are the delimiter between the YAML code and the Markdown code.

There is extensive documentation online on how to use advanced Markdown language to customize your text, but to start off, you may want to become familiar with how to delimit your text by sections. You can set section names in your blog post by placing your section titles in front of pound symbols #. You can tinker with different text sizes for your title by adding more pound symbols in front of your title. I personally didn’t want my section titles to be too big, so I placed 3 pound symbols in the sections of this blog post.

You can also add captioned images to your post in the following manner:

![Text](path/to/image.png "Image Caption")

![Text](http://linktoimage.com/image.png "Image Caption")

You have now learned the basics to coding up a blog site! More posts coming soon.

Charles Varga
Charles Varga
Cybersecurity Analyst at Florida Department of Financial Services

I am a cybersecurity professional working for the State of Florida and attending Pace University. My career interests include incident response, cybersecurity automation, pen testing, red teaming, and malware analysis.

Next
Previous

Related