Where Did I Write That?

If I wanted to find unpublished articles, I could use the following Terminal Command:

findstr /S /I /M /C:“draft:true” *.md

/S - Goes through all the subdirectories
/I - Case insensitive
/M - List the files we find the search text in.
If you leave out the /C: it will list a file with any of the words in the search string.
/C: - Only find the files with the exact contents of the search string
*.md - Only look in markdown files.

Hugo Basics

hugo new posts/my-new-post.md

Hugo Run the Server###

hugo server -D [The -D includes all the draft content] Visit: http://localhost:1313

Markdown

If you wish to have a bunch of lines

line 1
line 2
line 3

You must leave 2 spaces at the end of each line otherwise marked down won’t produce line breaks.

Git Basics

To update a post you just changed:

git add content/posts/using-hugo-git.md
git commit -m “Updated Hugo Basics post”
git push

To add all modified files at once git add . git commit -m “Updated site content” git push