Skip to content
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 · 2 comments
Closed

hugo convert does not pick up draft pages #5457

zwbetz-gh opened this issue Nov 21, 2018 · 2 comments
Assignees
Milestone

Comments

@zwbetz-gh
Copy link

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
Copy link
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 'hugo convert toTOML' not working 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 as completed in dcfeed3 Nov 24, 2018
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants