Coder Social home page Coder Social logo

jekyll / jekyll-compose Goto Github PK

View Code? Open in Web Editor NEW
659.0 10.0 75.0 212 KB

:memo: Streamline your writing in Jekyll with these commands.

Home Page: http://rubygems.org/gems/jekyll-compose

License: MIT License

Ruby 99.45% Shell 0.55%
jekyll-plugin

jekyll-compose's Introduction

Gem Version Linux Build Status Windows Build status Backers on Open Collective Sponsors on Open Collective

Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind GitHub Pages, which you can use to host sites right from your GitHub repositories.

Philosophy

Jekyll does what you tell it to doΒ β€” no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.

See: https://jekyllrb.com/philosophy

Getting Started

Diving In

Need help?

If you don't find the answer to your problem in our docs, or in the troubleshooting section, ask the community for help.

Code of Conduct

In order to have a more open and welcoming community, Jekyll adheres to a code of conduct adapted from the Ruby on Rails code of conduct.

Please adhere to this code of conduct in any interactions you have in the Jekyll community. It is strictly enforced on all official Jekyll repositories, websites, and resources. If you encounter someone violating these terms, please let one of our core team members know and we will address it as soon as possible.

Credits

Sponsors

Support this project by becoming a sponsor. Your logo will show up in this README with a link to your website. Become a sponsor! Jekyll Sponsor 0 Jekyll Sponsor 1 Jekyll Sponsor 2 Jekyll Sponsor 3 Jekyll Sponsor 4 Jekyll Sponsor 5 Jekyll Sponsor 6 Jekyll Sponsor 7 Jekyll Sponsor 8 Jekyll Sponsor 9

Contributors

This project exists thanks to all the people who contribute. Jekyll Contributors

Backers

Thank you to all our backers! πŸ™ Become a backer

Jekyll Backers

License

See the LICENSE file.

jekyll-compose's People

Contributors

alzeih avatar anxolerd avatar ashmaroli avatar bennyhallett avatar blackjid avatar buo avatar campo avatar courajs avatar dirtyf avatar djds23 avatar envygeeks avatar exalted avatar gittoby avatar jandudulski avatar jekyllbot avatar mehonoshin avatar mloberg avatar nmenag avatar parkr avatar patrickclery avatar toshimaru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jekyll-compose's Issues

Generated filename should not have accents

Hi,

Not a big problem as it could easily be fixed manually but it may be problematic for some language with accents (like french :/ )

When I create a draft like this :


bundle exec jekyll draft "GΓ©nΓ©rer un brouillon"

The filename contains accents which is a bad idea I think because unless you change the filename manually (what I do atm) or edit the slug in the front matter manually, you'll end up with messy url with encoded characters.

Don't know if that possible but adding a slugify to the process of filenaming might be a solution.

Time for a new release

Hello, maintainers! πŸ‘‹

By my calculations, it's time for a new release of jekyll-compose. It's been over 2 months since the last release, v0.11.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! πŸ’ž ✨

Time for a new release

Hello, maintainers! πŸ‘‹

By my calculations, it's time for a new release of jekyll-compose. It's been over 2 months since the last release, v0.8.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! πŸ’ž ✨

Publishing a draft with a date in the front-matter should use that date instead

Let's say I have a draft, with a date field in the front matter:


---
layout: post
title: Test!
date: 2015-01-01 00:01
categories:

---

Test body.

When I publish this draft, I expected it to get the name 2015-01-01-test.md, but it gets the current date instead. However, Jekyll displays the date field everywhere, and also uses it for the permalink. The published post should match that date, if specified.

Time for a new release

Hello, maintainers! πŸ‘‹

By my calculations, it's time for a new release of jekyll-compose. It's been over 2 months since the last release, v0.8.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! πŸ’ž ✨

Commands fail with opaque error when _posts does not exist

Running a jekyll publish, or jekyll post when _posts does not exist results in errors looking like this:
jekyll 2.5.3 | Error: No such file or directory @ sys_fail2 - (_drafts/my-site.md, _posts/2015-06-07-my-site.md)
I think it should create the folder, or at least display an informative error instead.

Titles should be quoted/escaped

Certain characters, such as the colon (:) are not allowed in an unquoted title. This command:

jekyll draft "Jekyll: How to use"

Generates a file with this front-matter:


---
layout: post
title: Jekyll: How to use

---

Which causes this error:

Error: could not read file jekyll-how-to-use.md: (): mapping values are not allowed in this context at line 3 column 14

Instead, the title in the front-matter should be quoted:


---
layout: post
title: "Jekyll: How to use"

---

jekyll-compose doesn't show up in help, commands don't work.

gem install jekyll-compose
Successfully installed jekyll-compose-0.2.1
Parsing documentation for jekyll-compose-0.2.1
Done installing documentation for jekyll-compose after 0 seconds
1 gem installed

=>

jekyll help
jekyll 2.4.0 -- Jekyll is a blog-aware, static site generator in Ruby

Usage:

  jekyll <subcommand> [options]

Options:
        -s, --source [DIR]  Source directory (defaults to ./)
        -d, --destination [DIR]  Destination directory (defaults to ./_site)
            --safe         Safe mode (defaults to false)
        -p, --plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]  Plugins directory (defaults to ./_plugins)
            --layouts DIR  Layouts directory (defaults to ./_layouts)
        -h, --help         Show this message
        -v, --version      Print the name and version
        -t, --trace        Show the full backtrace when an error occurs

Subcommands:
  build                 Build your site
  docs                  Launch local server with docs for Jekyll v2.4.0
  doctor, hyde          Search site and print specific deprecation warnings
  help                  Show the help message, optionally for a given subcommand.
  new                   Creates a new Jekyll site scaffold in PATH
  serve, server         Serve your site locally

=>

jekyll draft
Invalid command. Use --help for more information

:(

Only thing I can think of is it looks like jekyll-compose requires rake and I do have it in my /usr/local/bin but Gem list doesn't list it so I assume it got there some other way (It is 10.4.2 though).

Time for a new release

Hello, maintainers! πŸ‘‹

By my calculations, it's time for a new release of jekyll-compose. It's been over 2 months since the last release, v0.8.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! πŸ’ž ✨

fatal: 'jekyll draft' could not be found.

gem install jekyll-compose

then use jekyll draft yields

fatal: 'jekyll draft' could not be found. You may need to install the jekyll-draft gem or a related gem to be able to use this subcommand.

jekyll-compose-0.4.1 and jekyll 3.1.1

output of jekyll help

jekyll 3.1.1 -- Jekyll is a blog-aware, static site generator in Ruby

Usage:

  jekyll <subcommand> [options]

Options:
        -s, --source [DIR]  Source directory (defaults to ./)
        -d, --destination [DIR]  Destination directory (defaults to ./_site)
            --safe         Safe mode (defaults to false)
        -p, --plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]  Plugins directory (defaults to ./_plugins)
            --layouts DIR  Layouts directory (defaults to ./_layouts)
            --profile      Generate a Liquid rendering profile
        -h, --help         Show this message
        -v, --version      Print the name and version
        -t, --trace        Show the full backtrace when an error occurs

Subcommands:
  docs                  
  help                  Show the help message, optionally for a given subcommand.
  new                   Creates a new Jekyll site scaffold in PATH
  clean                 Clean the site (removes site output and metadata file) without building.
  build, b              Build your site
  doctor, hyde          Search site and print specific deprecation warnings
  serve, server, s      Serve your site locally
  import                Import your old blog to Jekyll

feat: generic compose command

Scenario

In order to manage my website content like a hacker
As a jekyll user using the jekyll-compose plugin
I can create all types of documents from the command line

Replace current draft and post commands, with a generic compose subcommand, that could also handle collection documents.

Creating

bundle exec jekyll compose _drafts/my-upcoming-post.md
bundle exec jekyll compose _post/new-release.md
bundle exec jekyll compose _recipes/yummy-cake.md

Given I have a collection named _recipes
And that I have defined default front matter in config 
When I run `bundle exec jekyll compose _recipes/yummy-cake.md`
Then a new document with default front matter is created in the _recipes folder

Publishing

bundle exec jekyll publish _drafts/my-upcoming-post.md
bundle exec jekyll publish _post/new-release.md
bundle exec jekyll publish __recipes/yummy-cake.md

Unpublishing

bundle exec jekyll unpublish _drafts/my-upcoming-post.md
bundle exec jekyll unpublish _post/new-release.md
bundle exec jekyll unpublish __recipes/yummy-cake.md

Front matter

Additional front-matter could be added in the `defaults:

defaults:
  -
    scope:
      path: ""
      type: "recipes" 
    values:
      layout: "recipe"
    front-matter:
      difficulty: ""
      time: ""
      ingredients: ""

0.3.0 release

@parkr Would you create a new release with the new page generation functionality?

jekyll help does not show jekyll-compose commands; Mac OSX: gem 2.4.5: jekyll 2.5.3: jekyll-compose 0.2.1:

I am unable to get the jekyll-compose commands to run. Specifically I tried "jekyll draft" and I got:
Invalid command. Use --help for more information
When I look up jekyll help, I do not see the "draft", "post" or "publish" commands.
gem list --local shows me the following versions of relevant gems:
jekyll (2.5.3, 2.4.0)
jekyll-coffeescript (1.0.1)
jekyll-compose (0.2.1)
jekyll-gist (1.1.0)
jekyll-import (0.5.3)
jekyll-mentions (0.2.1)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.6.2)
jekyll-sass-converter (1.3.0, 1.2.0)
jekyll-sitemap (0.6.3)
jekyll-watch (1.2.1)

Not too sure, what I am doing wrong.

If `collections_dir` is not set, `arg_parser` raises exception

I just tried installing this gem into a Jekyll 3.5.2 app, and had issues with:

TypeError: no implicit conversion of nil into String
  /Users/ttilberg/.asdf/installs/ruby/2.6.5/lib/ruby/gems/2.6.0/gems/jekyll-compose-0.9.0/lib/jekyll-compose/arg_parser.rb:36:in `join'

This line is trying to File.join a nil argument if collections_dir is not set.

        File.join(config["source"], config["collections_dir"])

I cannot see the compose commands

I added the gem to the gemfile

gem 'jekyll-compose'

this to the _config.yml

gems:
  - jekyll-compose

runned bundle install

and when I try jekyll --help or bundle exec jekyll --help I cannot see any of the composer commands...

I also tried adding this to the gemfile

group :jekyll_plugins do
  gem "jekyll-compose"
end

any idea??

thanks

Incompatible with Jekyll3 ?

For some reason this seems incompatible with Jekyll 3. Can anyone verify this ?

or I am doing it wrong

edit : sorry my bad.

Command not available; unresolved specs

$ bundle exec jekyll post
Invalid command. Use --help for more information 

$ jekyll post
WARN: Unresolved specs during Gem::Specification.reset:
      pygments.rb (~> 0.6.0)
      redcarpet (~> 3.1)
      listen (~> 2.7)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Users/ndarville/.rbenv/versions/2.2.0-dev/lib/ruby/gems/2.3.0/gems/jekyll-2.5.3/bin/jekyll:21:in `block in <top (required)>': cannot load such file -- jekyll/version (LoadError)
    from /Users/ndarville/.rbenv/versions/2.2.0-dev/lib/ruby/gems/2.3.0/gems/mercenary-0.3.5/lib/mercenary.rb:18:in `program'
    from /Users/ndarville/.rbenv/versions/2.2.0-dev/lib/ruby/gems/2.3.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
    from /Users/ndarville/.rbenv/versions/2.2.0-dev/bin/jekyll:23:in `load'
    from /Users/ndarville/.rbenv/versions/2.2.0-dev/bin/jekyll:23:in `<main>’

I’ve tried both using jekyll-compose in my Gemfile as well as a gem in _config.yml with the same result.

Time for a new release

Hello, maintainers! πŸ‘‹

By my calculations, it's time for a new release of jekyll-compose. It's been over 2 months since the last release, v0.11.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! πŸ’ž ✨

fatal: 'jekyll draft' could not be found.

Using jekyll 3.7.0 and jekyll-compose 0.6.0

Created a new test directory with following Gemfile

source "https://rubygems.org"

gem 'jekyll-compose'

After running the command

bundler install
bundler exec jekyll draft 

Gives me error:
fatal: 'jekyll draft' could not be found. You may need to install the jekyll-draft gem or a related gem to be able to use this subcommand.

Below are the output of my bundler exec jekyll help

jekyll 3.7.0 -- Jekyll is a blog-aware, static site generator in Ruby

Usage:

  jekyll <subcommand> [options]

Options:
        -s, --source [DIR]  Source directory (defaults to ./)
        -d, --destination [DIR]  Destination directory (defaults to ./_site)
            --safe         Safe mode (defaults to false)
        -p, --plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]  Plugins directory (defaults to ./_plugins)
            --layouts DIR  Layouts directory (defaults to ./_layouts)
            --profile      Generate a Liquid rendering profile
        -h, --help         Show this message
        -v, --version      Print the name and version
        -t, --trace        Show the full backtrace when an error occurs

Subcommands:
  docs                  
  import                
  build, b              Build your site
  clean                 Clean the site (removes site output and metadata file) without building.
  doctor, hyde          Search site and print specific deprecation warnings
  help                  Show the help message, optionally for a given subcommand.
  new                   Creates a new Jekyll site scaffold in PATH
  new-theme             Creates a new Jekyll theme scaffold
  serve, server, s      Serve your site locally

Am I doing it wrong?

Support the source configuration setting

I'm using Jekyll in it's own directory from the project root using the source: dir/ setting in _config.yml, however jekyll-compose doesn't respect that and always creates a _posts in the project root instead of in dir/_posts.

Rename command

At least for me, writing a title is the last step of the writing process. I start by having some idea of what I want to write but it always evolves over the course of actual writing. If I start by writing a title first, more often than not, I need to amend that title. In jekyll that means I need to change front matter and rename a file. Not the nicest IMO.

I'd like to be able to do something like jekyll rename _drafts/untitled.md 'My Actual Title'

When looking through the source code to see how this might be accomplished, I noticed that Jekyll::Compose::ArgParser#validate! returns a hard-coded error message if the argument list is empty, which complains that a name must be specified. Which is, of course, wouldn't work with a command that requires two arguments like a rename command.

Do you think a rename command is worthwhile? If so, how would you handle the hard-coded error message?

Thanks.

Status of compose commands

Seems like the discussion around incorporating drafts, post, pages command cooled off recently. I was wondering if there was still interest in this. Looking at jekyll/jekyll#2378, I think it's just a matter of opening a new PR against this repo with the same code. @BennyHallett were you still planning on making a PR? If not, I would be more than happy to help (of course, I would still label those commits as you being the author).

Can see commands in help but they do not work

I followed instruction commands and bundled so I have the jekyll-compose gem installed in my Gemfile

source "https://rubygems.org"
ruby RUBY_VERSION

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "3.6.3"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
   gem "jekyll-feed", "~> 0.6"
   gem "jekyll-paginate-v2", "~> 1.9"
   gem 'jekyll-compose', "~> 0.9"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

and I see the commands when I run bundle exec Jekyll help

However when I try to create a file for example bundle exec jekyll post "My New Post" or bundle exec jekyll draft "My new draft"
I get:

Configuration file: /Users/olly/Development/pop-website/_config.yml
jekyll 3.6.3 | Error:  no implicit conversion of nil into String

Am I missing something from my config or am I not entering the arguments correctly?

Perhaps I need a later version of Jekyll?

Invalid Command

I am unable to get Jekyll compose to work. At first, I got it to work after placing the Ruby installation directory in my $PATH variable, as discussed here. But then, regretfully, I did bundle install and it stopped working. I don't really know how to get it to work now.

This is my gemfile:

source 'https://rubygems.org'

gem 'jekyll'
gem 'github-pages'

group :jekyll_plugins do
  gem 'jekyll-compose'
  gem 'jekyll-paginate'
end

This is my gem env:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.5.1
  - RUBY VERSION: 2.0.0 (2014-05-08 patchlevel 481) [universal.x86_64-darwin14]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
  - USER INSTALLATION DIRECTORY: /Users/acastano/.gem/ruby/2.0.0
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - SPEC CACHE DIRECTORY: /Users/acastano/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-14
  - GEM PATHS:
     - /Library/Ruby/Gems/2.0.0
     - /Users/acastano/.gem/ruby/2.0.0
     - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Library/Frameworks/Python.framework/Versions/2.7/bin
     - /Library/Frameworks/Python.framework/Versions/Current/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /opt/X11/bin
     - /usr/local/git/bin
     - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
     - /Library/Ruby/Gems/2.0.0/gems/
     - /Users/acastano/.gem/ruby/2.0.0

Are my $PATH configurations correct? Could there be a conflict between my gemfile and my gemfile.lock now?

I'm unsure of how to proceed. The basic jekyll commands still work, but I would really like to install this plugin as well. Thanks in advance for the help

Jekyll fails with: uninitialized constant Jekyll::Commands::Draft::Compose (NameError)

I've packaged the gem for Debian. But after installation jekyll help throws an error:

$ jekyll help
Traceback (most recent call last):
	12: from /usr/bin/jekyll:6:in `<main>'
	11: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
	10: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
	 9: from /usr/lib/ruby/vendor_ruby/jekyll.rb:193:in `<top (required)>'
	 8: from /usr/lib/ruby/vendor_ruby/jekyll.rb:12:in `require_all'
	 7: from /usr/lib/ruby/vendor_ruby/jekyll.rb:12:in `each'
	 6: from /usr/lib/ruby/vendor_ruby/jekyll.rb:13:in `block in require_all'
	 5: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
	 4: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
	 3: from /usr/lib/ruby/vendor_ruby/jekyll/commands/draft.rb:3:in `<top (required)>'
	 2: from /usr/lib/ruby/vendor_ruby/jekyll/commands/draft.rb:4:in `<module:Jekyll>'
	 1: from /usr/lib/ruby/vendor_ruby/jekyll/commands/draft.rb:5:in `<module:Commands>'
/usr/lib/ruby/vendor_ruby/jekyll/commands/draft.rb:41:in `<class:Draft>': uninitialized constant Jekyll::Commands::Draft::Compose (NameError)
Did you mean?  Complex

The conflicting line is in jekyll/commands/draft.rb. Any idea? Jekyll is at version 3.8.3, Ruby is at version 2.5.2.

compase commands are not registered in jekyll

I installed the latest jekyll-composed, and even added code below in Gemfile, jekyll still doesn't recognize draft, post, etc... The error came back is invalid command

group :jekyll_plugins do
  gem 'jekyll-compose'
end

Avoid unecessary configuration logs

Given I use jekyll-compose plugin
When I create a new post
Then I get the following output:

bundle exec jekyll post a-new-post
Configuration file: /Users/frank/code/jekyll/tests/default/_config.yml
Configuration file: /Users/frank/code/jekyll/tests/default/_config.yml
New post created at src/_posts/2018-10-07-a-new-post.md.
Configuration file: /Users/frank/code/jekyll/tests/default/_config.yml

I should simply get:

bundle exec jekyll post a-new-post
New post created at src/_posts/2018-10-07-a-new-post.md.

We should mirror jekyll's build and serve command and use configuration_from_options here.

Custom default front matter variables not working

Hi there, sorry it's me again.

I am able to generate posts, pages, drafts etc with Jekyll-compose, however I cannot get the custom front matter variables that I put inside the jekyll_compose section of my config.yaml to appear in the front matter of any newly created posts/drafts

I have tried

jekyll_compose:
  default_front_matter:
    drafts:
        main_img_url: "https://images-we-got-pop.imgix.net/website/blog/pop-logo-small.png"
        author_name: "Me"
        categories: "general"
        description: "Description"
    posts:
        main_img_url: "https://images-we-got-pop.imgix.net/website/blog/pop-logo-small.png"
        author_name: "Me"
        categories: "general"
        description: "Description"

and also without values:

jekyll_compose:
  default_front_matter:
    drafts:
        main_img_url: 
        author_name: 
        categories: 
        description: 
    posts:
        main_img_url:
        author_name: 
        categories: 
        description: 

I have also tried to use the ones presented in the ReadMe but they did not appear in the front-matter either

But when I generate posts/drafts I only get the standard variables in my new post's front matter

---
title: this-is-a-new-post
date: 2019-10-09 11:14 +0100
---

I have tried updating my Jekyll version from 3.7.0 to 3.8.6 but this issue still persists

Am I meant to run the jekyll-compose CLI commands with --config to use the custom variables or is this unrelated?

Configure default layout?

Started to kick the tires with this gem, and I noticed that new drafts/posts are created with layout:post

My theme uses a different layout for posts; is there a way to have jekyll-compose default to that different layout? I'm guessing it would be something in _config.yml?

Check for `collections_dir`

related to jekyll/jekyll#6685

Given `collections_dir` is defined in config
Then `jekyll post` should create new post in `collection_dir/_posts`
And `jekyll draft` should create new draft in `collections_dir/_drafts`
And `jekyll publish` should move draft in `collection_dir/_posts`
And `jekyll unpublish` should move post in `collections_dir/_drafts`

Look up config file in parents recursively

Use case: I add categories to posts by putting them into folders of the same name (Jekyll supports this!), e.g.

β”œβ”€β”€ jekyll
β”‚   └── update
β”‚       └── _posts
β”‚           └── 2019-04-07-welcome-to-jekyll.md

Instead of adding an option to Jekyll Compose, I think the more unix-y way of adding support for this just cding into jekyll/update and running draft, publish, etc. commands there.

However, Jekyll Compose can't locate the config file in this case, as it's only looking in the current working directory. Support for recursive search until it finds a config file in a parent would enable this.

Publish - must specify a draft path

When I run:

bundle exec jekyll publish

it returns:
jekyll 3.7.3 | Error: You must specify a draft path.

However, running:

bundle exec jekyll draft "Test Post"

works find and creates the file in _drafts

No collection_dir in Jekyll config causes TypeError

I don't have a collections_dir key in my Jekyll config; I think #74 is throwing a TypeError:

Error:  no implicit conversion of nil into String

I think the arg parser needs to gracefully handle the lack of a key, but I don't know enough Ruby to do this myself πŸ˜…

Full traceback from running $ bundle exec jekyll post "Hi" --trace

Configuration file: /Users/mitchellbusby/repos/mitchell-busby/_config.yml
/Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/jekyll-compose-0.9.0/lib/jekyll-compose/arg_parser.rb:36:in `join': no implicit conversion of nil into String (TypeError)
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/jekyll-compose-0.9.0/lib/jekyll-compose/arg_parser.rb:36:in `source'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/jekyll-compose-0.9.0/lib/jekyll/commands/post.rb:35:in `process'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/jekyll-compose-0.9.0/lib/jekyll/commands/post.rb:13:in `block (2 levels) in init_with_program'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/gems/jekyll-3.3.0/exe/jekyll:13:in `<top (required)>'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/bin/jekyll:23:in `load'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/bin/jekyll:23:in `<main>'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
        from /Users/mitchellbusby/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'

Time for a new release

Hello, maintainers! πŸ‘‹

By my calculations, it's time for a new release of jekyll-compose. It's been over 2 months since the last release, v0.6.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! πŸ’ž ✨

Time for a new release

Hello, maintainers! πŸ‘‹

By my calculations, it's time for a new release of jekyll-compose. It's been over 2 months since the last release, v0.9.0.

What else is left to be done before a new release can be made? Please make sure to update History.markdown too if it's not already updated.

Thanks! πŸ’ž ✨

Add unpublish command

would be good implement the command unpublish for the posts, for a post and convert it into a draft.

Does it work with `github-pages` gem?

I can't get this working with the github-pages gem, which is just a gem that pins jekyll and some extra dependencies to match the versions running on GitHub Pages.

My Gemfile looks like this:

source 'https://rubygems.org'

gem 'jekyll-compose'
gem 'github-pages'

Using bundler but the new commands from compose are not being installed. What am I missing?

Open new draft in editor

auto_open only works for posts at the moment, it should also work for drafts.

Given that I set `auto_open: true` in config
When I run `bundle exec jekyll draft a-new-draft`
Then new created draft opens in editor

Drop leading ./ from messages & errors?

I personally think the message
New post created at _posts/2015-06-19-thingy.md.
would be a bit nicer than
New post created at ./_posts/2015-06-19-thingy.md.

The command is only valid from one directory anyway (the root of the jekyll project)

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.