command: Remove undraft command

According to @bep, it is easier to undraft content by
editing manually the frontmatter of said content by
setting the draft flag to `false`, or removing it completely,
than to rely on the undraft command which is a source of
many bugs.

Fixes #4353
This commit is contained in:
Robert Basic
2018-01-29 16:21:42 +01:00
committed by Bjørn Erik Pedersen
parent b6f3f087aa
commit 2fa70c9344
7 changed files with 2 additions and 296 deletions

View File

@@ -75,7 +75,6 @@ hugo [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
* [hugo new](/commands/hugo_new/) - Create new content for your site
* [hugo server](/commands/hugo_server/) - A high performance webserver
* [hugo undraft](/commands/hugo_undraft/) - Undraft resets the content's draft status
* [hugo version](/commands/hugo_version/) - Print the version number of Hugo
###### Auto generated by spf13/cobra on 25-Jan-2018

View File

@@ -1,43 +0,0 @@
---
date: 2018-01-25T10:24:52+01:00
title: "hugo undraft"
slug: hugo_undraft
url: /commands/hugo_undraft/
---
## hugo undraft
Undraft resets the content's draft status
### Synopsis
Undraft resets the content's draft status
and updates the date to the current date and time.
If the content's draft status is 'False', nothing is done.
```
hugo undraft path/to/content [flags]
```
### Options
```
-h, --help help for undraft
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 25-Jan-2018

View File

@@ -53,7 +53,6 @@ Available Commands:
list Listing out various types of content
new Create new content for your site
server A high performance webserver
undraft Undraft resets the content's draft status
version Print the version number of Hugo
Flags:

View File

@@ -75,13 +75,9 @@ hugo new about.md
The preceding example for the about page leverages archetypes to scaffold a new content file with preconfigured front matter. [Find out more about Hugo's archetypes](/content-management/archetypes/).
{{% /note %}}
Now you can edit `contents/about.md` in your text editor of choice, but this is not necessary for the purposes of this guide. Running the following command will build your Hugo site into the `public` directory. We have added `undraft` to ensure that the example page is no longer in draft mode:
Now you can edit `contents/about.md` in your text editor of choice, but this is not necessary for the purposes of this guide. Running the following command will build your Hugo site into the `public` directory.
{{< code file="hugo-build-undraft.sh" >}}
hugo undraft content/about.md
{{< /code >}}
Once the website is build, t's a good idea to run the following command to start a local server and ensure you're changes have been implemented:
Once the website is build, it's a good idea to run the following command to start a local server and ensure you're changes have been implemented:
```
hugo server --theme=herring-cove