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

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 a team October 21, 2018 14:43
@ashmaroli
Copy link
Member Author

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

@DirtyF
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 DirtyF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mirror-draft-and-post-command branch from e9fc664 to 5285a5d Compare October 22, 2018 06:10
@ashmaroli ashmaroli force-pushed the mirror-draft-and-post-command branch from 5285a5d to 54b9911 Compare October 22, 2018 10:03
@ashmaroli
Copy link
Member Author

@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
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 mirror-draft-and-post-command branch October 31, 2018 13:12
@DirtyF DirtyF mentioned 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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants