mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 01:05:49 -04:00
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:
parent
f8cc6d51f2
commit
8fc9e325b9
@ -75,7 +75,6 @@ hugo [flags]
|
|||||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
||||||
* [hugo new](/commands/hugo_new/) - Create new content for your site
|
* [hugo new](/commands/hugo_new/) - Create new content for your site
|
||||||
* [hugo server](/commands/hugo_server/) - A high performance webserver
|
* [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
|
* [hugo version](/commands/hugo_version/) - Print the version number of Hugo
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra on 25-Jan-2018
|
###### Auto generated by spf13/cobra on 25-Jan-2018
|
||||||
|
@ -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
|
|
@ -53,7 +53,6 @@ Available Commands:
|
|||||||
list Listing out various types of content
|
list Listing out various types of content
|
||||||
new Create new content for your site
|
new Create new content for your site
|
||||||
server A high performance webserver
|
server A high performance webserver
|
||||||
undraft Undraft resets the content's draft status
|
|
||||||
version Print the version number of Hugo
|
version Print the version number of Hugo
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
|
@ -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/).
|
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 %}}
|
{{% /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" >}}
|
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 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:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
hugo server --theme=herring-cove
|
hugo server --theme=herring-cove
|
||||||
|
Loading…
x
Reference in New Issue
Block a user