Hexo new [layout] {title}
Creates a new page for the website.
Where :
[Layout] (which is optional) can have one of following values:
- Post - path is source/_posts
- Page - page is source
- Draft - path is source/_drafts ** Use this version. It creates a page that you will use later.
{title}
- use quotes if you have spaces
- Use proper casing “hexo notes” shows up as header 1 when published
- for multiword titles surround the text in Quotes -
For example:
1 | hexo new draft “hexo notes” |
Use the markdown language. Do not use header 1, the hexo server presents the title this way
What happened is it created a file in the _drafts folder named “hexo-notes.md”
Editing a draft
1 | notepad source/_drafts/{title} |
Editing something that has been published
1 | notepad source/_posts/{title} |
For example:
1 | notepad "source/_drafts/Hexo Notes.md" |
Dont forget to use the Publish function to publish the page.