Draft workflow¶
A Draft workflow is a content creation process that allows authors to manage and preview unfinished work before it is officially published.^[600-developer__blog__hexo-blog__Hexo-command.md]
Creating Drafts¶
In static site generators like [[Hexo]], drafts are created using specific commands to generate the necessary files without publishing them to the public site.^[600-developer__blog__hexo-blog__Hexo-command.md]
The command to create a new draft is typically:
hexo new drafts "文章名称"
This establishes a dedicated space for work that is not yet ready for release^[600-developer__blog__hexo-blog__Hexo-command.md].
Previewing Drafts¶
By default, draft content is hidden during local development or server preview.^[600-developer__blog__hexo-blog__Hexo-command.md]
To view the draft content on a local server, the server must be started with a specific flag:
hexo server --drafts
This command renders the draft files, allowing the author to review the structure and content in the browser environment^[600-developer__blog__hexo-blog__Hexo-command.md].
Publishing Drafts¶
Once the content is finalized, it must be moved from the draft folder to the standard posts directory.^[600-developer__blog__hexo-blog__Hexo-command.md]
The following command handles the transition of the file from the draft state to a published post:
hexo publish "文章名称"
This finalizes the workflow, making the content part of the standard site structure^[600-developer__blog__hexo-blog__Hexo-command.md].
Related Concepts¶
- Documentation Workflow
- [[Publishing]]
Sources¶
^[600-developer__blog__hexo-blog__Hexo-command.md]