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

Mirror `draft` command to current `post` command #79

Merged
merged 1 commit into from Oct 31, 2018

Conversation

@ashmaroli
Copy link
Member

ashmaroli commented Oct 21, 2018

Adds two features to draft command:

  • Define front matter defaults for new drafts using jekyll_compose.draft_default_front_matter in _config.yml
  • Open new draft in editor based on EDITOR OR JEKYLL_EDITOR ENV vars
@ashmaroli ashmaroli requested a review from jekyll/plugin-core Oct 21, 2018
@ashmaroli

This comment has been minimized.

Copy link
Member Author

ashmaroli commented Oct 21, 2018

Apparently, the CI builds are getting stalled after an "EDITOR" instance gets opened...

@DirtyF

This comment has been minimized.

Copy link
Member

DirtyF commented Oct 21, 2018

It works like a charm 👍

Same on my computer for the tests:

  • on master script/test does not open default editor
  • on this branch nano gets fired and prevent the script to exit.
Copy link
Member

DirtyF left a comment

As we don't support collections documents for now, we could use a common key for default front matter, to avoid current config duplication:

post_default_front_matter:
    description:
    image:
    source:
      url:
      title:
      author:
draft_default_front_matter:
    description:
    image:
    source:
      url:
      title:
      author:

That could become:

default_front_matter:
    description:
    image:
    source:
      url:
      title:
      author:
@ashmaroli ashmaroli force-pushed the ashmaroli:mirror-draft-and-post-command branch from e9fc664 to 5285a5d Oct 22, 2018
@ashmaroli ashmaroli force-pushed the ashmaroli:mirror-draft-and-post-command branch from 5285a5d to 54b9911 Oct 22, 2018
@ashmaroli

This comment has been minimized.

Copy link
Member Author

ashmaroli commented Oct 22, 2018

@DirtyF I've fixed the tests and rebased the branch.
Also, I opted for a separate draft_default_front_matter so that users can supply different front matter templates for drafts and posts..

@DirtyF
DirtyF approved these changes Oct 31, 2018
@DirtyF

This comment has been minimized.

Copy link
Member

DirtyF commented Oct 31, 2018

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit a0fcf2c into jekyll:master Oct 31, 2018
jekyllbot added a commit that referenced this pull request Oct 31, 2018
@ashmaroli ashmaroli deleted the ashmaroli:mirror-draft-and-post-command branch Oct 31, 2018
@DirtyF DirtyF referenced this pull request Nov 1, 2018
@jekyll jekyll locked and limited conversation to collaborators Oct 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.