lib/jekyll/zettel/commands/zettel.rb in jekyll-zettel-0.1.0 vs lib/jekyll/zettel/commands/zettel.rb in jekyll-zettel-0.1.1

- old
+ new

@@ -8,12 +8,14 @@ prog.command(:zettel) do |c| c.syntax 'zettel' c.description 'Creates a new Zettel within subdir zettel' c.action do |_args, _options| uuid = new_zettel - new_page(uuid, "zettel/#{uuid}/index.md") + file = "zettel/#{uuid}/index.md" + new_page(uuid, file) Jekyll.logger.info '✓', "Created new Zettel with UUID: `#{uuid}`" + system("code #{File.expand_path(file)}") end end end def new_zettel