New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hugo convert does not pick up draft pages #5457

Closed
zwbetz-gh opened this Issue Nov 21, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@zwbetz-gh

zwbetz-gh commented Nov 21, 2018

Output of hugo env:

Hugo Static Site Generator v0.51 darwin/amd64 BuildDate: 2018-11-07T10:09:45Z
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.11"

Steps to reproduce:

  1. hugo new site yaml-site --format "yaml"
  2. cd yaml-site
  3. hugo new page1.md && hugo new page2.md && hugo new page3.md
  4. hugo convert toTOML

The output of hugo convert toTOML says:

Error: Unsafe operation not allowed, use --unsafe or set a different output path

So I tried: hugo convert toTOML --unsafe, and got output:

processing 3 content files

But when inspecting the front matter of content files, they are still in YAML.

Also see: https://discourse.gohugo.io/t/hugo-convert-totoml-not-working-as-expected/15414

@bep

This comment has been minimized.

Member

bep commented Nov 24, 2018

I had to scratch my head a little about this one. The test case above isn't all that realistic -- the reason why the above fails, is that all the newly created pages are drafts. It should work, of course, but I don't think it ever worked. If you edit the pages and remove the draft flag, everything works smoother.

@bep bep changed the title from 'hugo convert toTOML' not working to hugo convert does not pick up draft pages Nov 24, 2018

@bep bep added the Bug label Nov 24, 2018

@bep bep added this to the v0.52 milestone Nov 24, 2018

@bep bep self-assigned this Nov 24, 2018

@bep bep closed this in dcfeed3 Nov 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment