gopheracademy / gopheracademy-web

Public Website for blog.GopherAcademy.com
http://blog.gopheracademy.com
Other
184 stars 167 forks source link

Previewing Draft Posts and Hugo list drafts #98

Open nathany opened 9 years ago

nathany commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

I'll update the README.

nathany commented 9 years ago

Thanks.

nathany commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

Yah. I totally understand.

@spf13 any ideas?

spf13 commented 9 years ago

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

spf13 commented 9 years ago

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

hugo list drafts

nathany commented 9 years ago

Thanks Steve.

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

ghost commented 9 years ago

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 commented 9 years ago

Sounds good. :+1:

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

nathany commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

nathany commented 9 years ago

:+1: