Creating and editing blog entries - nshebang/nob GitHub Wiki
The command that is used to create new blog entries is nob new [<title>]
It is highly recommended to enter a title for the new entry. Example: nob new "This is an example". Please keep in mind that for titles that contain spaces double quotes are absolutely required for the title to be properly parsed by nob. If you need to use double quotes in the title, use \". Example: nob new "This is an \"example\""
Please note that nob new creates Markdown entries and not HTML static files. This means your entries are not immediately posted after you create them. You need (re)build the site HTML files by running nob build to apply any changes you make to your blog entries or static files (HTML)
Since version 2.0.0, drafts work in a different and more convenient way than they used to. When you create an entry, nob creates the Markdown file for it and some metadata that looks like this:
---
TITLE: Entry title
DATE: XX-XX-XXXX
DATE RFC2822: Sun, XX Jan 20XX XX:XX:XX +0000
DRAFT: false
---
If you want to set an entry as a draft you can simply change the DRAFT option to true and then rebuild your static files for the entry to be unlisted. Once your entry is ready to be published, change the option to DRAFT: false or remove the DRAFT line to make your entry visible and public again.
Important: Entry metadata is required for nob to properly process the entry.
Nob will use the text editor indicated by the environment variable $EDITOR to open your new entries. In case this variable is not set, the default text editor nob will use to open new entry drafts is nano. On Linux and MacOS, you can set this variable by simply adding the line export EDITOR=vim to your ~/.bashrc or ~/.zshrc file. On Windows, you need to edit the $EDITOR from the environment variables GUI editor.
The editable Markdown versions of your entries are stored in <your blog root>/.nob/entries. If you want to edit an entry, just open its file (.nob/entries/<title>.md) using your preferred text editor, save it once you've finished, and rebuild the blog.
In case it is not clear yet, nob supports Markdown.