Workflow for draft posts #90

Closed
kyvinh opened this Issue Mar 7, 2013 · 5 comments

Comments

Projects
None yet
5 participants

kyvinh commented Mar 7, 2013

Hi there,

When writing blog posts, I like to have some draft articles that I'm working on, but don't want published.

These draft posts should thus be seen when using wintersmith preview but not built to the static pages.

I tried using the ignore option in config.json but then I cannot preview those pages since they are completely ignored.

Is there any way to simulate this workflow? Should this functionality be a plugin?

Thanks,

Kyvinh

Contributor

dashed commented Mar 20, 2013

In my opinion, this deviates from the purpose of a static-site generator. The preview feature should be only for last-minute checks before publishing.

For my own workflow to draft posts, I use pandoc as the main parser for wintersmith (there is a plugin available in the wiki). It can generate standalone html files fairly quickly for the purpose of previewing changes (such as LaTeX). Once I'm happy, I would just copy and paste it onto wintersmith, retaining only the metadata.

To make the drafting workflow with pandoc more easier, I modified someone's gruntjs task to watch any markdown files and automatically compile them to HTML.

I've been using Mou on my Mac or ReText in Linux for markdown editing since it gives me a realtime preview of the post.

Owner

jnordberg commented Mar 26, 2013

I agree with @dashed. I think output from the preview and build should stay the same, that said, in wintersmith 2.0 you will be able to do this by checking if environment.mode == 'preview'

I'm also toying with the idea of having the process environ exposed in some way. Then you could follow the same pattern as express e.g. using NODE_ENV=production wintersmith preview/build to control if your drafts are rendered or not.

Currently i think the best option is to use a markdown editor like @mimiflynn suggest. Mou can even preview using your own css.

kyvinh commented Mar 26, 2013

Thanks, I did not know that it was possible to have previewing with own CSS (as noted by @jnordberg ). So that fits my requirements. Closing.

@kyvinh kyvinh closed this Mar 26, 2013

igalic commented Nov 2, 2014

the main reason i'm looking for a way to store drafts is because i often spend a week or a month writing something. i've been using date: NaN until now. Now it's November and it shows up first in archives/index ;)

i've now started using 1999-01-01, so it'll show up last in the archive/index, rather than first, but i can still commit it/push it to have it _in git_

but i'm starting to think i should just work with branches for different articles.

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