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

Previewing Draft Posts and Hugo list drafts #98

Open
nathany opened this issue Dec 19, 2014 · 15 comments
Open

Previewing Draft Posts and Hugo list drafts #98

nathany opened this issue Dec 19, 2014 · 15 comments

Comments

@nathany
Copy link
Contributor

nathany commented Dec 19, 2014

I never figured out how to preview my post while it was in upcoming, so while working I actually stored it in advent-2014/ with draft = true in the front matter.

hugo --watch server --config="config.toml" -F -D

Maybe the README could suggest how to preview posts as people are writing them?

@ghost
Copy link

ghost commented Dec 19, 2014

upcoming/ is just a placeholder folder and Hugo doesn't serve anything from it. It's probably okay to put your post in content/ while you're writing/viewing it. Then move it to upcoming/ before the pull request.

@ghost
Copy link

ghost commented Dec 19, 2014

I'll update the README.

@nathany
Copy link
Contributor Author

nathany commented Dec 19, 2014

Thanks.

@nathany
Copy link
Contributor Author

nathany commented Dec 19, 2014

It can be a bit annoying to move back and forth now that I'm revising an upcoming article.

I think draft would work better from my point of view, though I can certainly see how upcoming/ makes it clear what is yet to be published.

@ghost
Copy link

ghost commented Dec 19, 2014

It's just easier for us Gopheracademy folks to see/know which articles are yet to be released if they're in upcoming/. If they're in content/we'd have to hunt down the drafts and then publish them. I'm not sure which workflow works better.

@nathany
Copy link
Contributor Author

nathany commented Dec 19, 2014

Yah. I totally understand.

@spf13 any ideas?

@spf13
Copy link
Contributor

spf13 commented Dec 19, 2014

I wrote a command to list all the drafts or future posts in hugo. Looks like I didn't commit it yet.

@spf13
Copy link
Contributor

spf13 commented Dec 19, 2014

Nevermind. I've committed it, it's in head.

hugo list drafts

@nathany
Copy link
Contributor Author

nathany commented Dec 19, 2014

Thanks Steve.

Does that satisfy the workflow for GA folks Ahsanul? /cc @bketelsen @erikstmartin

@nathany nathany changed the title Previewing Upcoming Posts? Previewing Draft Posts and Hugo list drafts Dec 19, 2014
@ghost
Copy link

ghost commented Dec 19, 2014

I think that could work. That way we could merge pull requests to publish articles rather than moving files from upcoming/ folder all the time. Though I think upcoming/ still serves a purpose for internal use.

@nathany
Copy link
Contributor Author

nathany commented Dec 19, 2014

Sounds good. 👍

I'm not sure if I have another article in me this year, but maybe.

@nathany
Copy link
Contributor Author

nathany commented Dec 22, 2014

Maybe it would also make sense to make use of future-dated posts (by not using -F) so that the upcoming posts could be slotted in with the correct dates. It still requires deploying each day though. :shipit:

@nathany
Copy link
Contributor Author

nathany commented Jan 3, 2015

Any news on moving to a draft-based workflow?

The upcoming/ folder makes it difficult to preview, such as in the recent snafu #108.

@ghost
Copy link

ghost commented Jan 3, 2015

I'm going to update the README tonight. Drafts-based workflow is probably for the best.

@nathany
Copy link
Contributor Author

nathany commented Jan 3, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants