Sha256: 014c4a0c087933572934b701d05dd9f1e9f6e3ef2b311b56eec5acd59f95b794

Contents?: true

Size: 973 Bytes

Versions: 5

Compression:

Stored size: 973 Bytes

Contents

require 'jekyll'
require 'securerandom'
require 'fileutils'
require 'citeproc'
require 'csl/styles'

module Jekyll
  # Jekyll zettel to your service
  module Zettel

    autoload :VERSION, 'jekyll/zettel/version'

    LOG_KEY = 'Zettel:'.freeze

    class Error < StandardError; end

    def write_catalog(object)
      Jekyll.logger.info LOG_KEY, "Created references in `#{@site.in_dest_dir('.objects', "#{object}.json")}`"

      page = Jekyll::PageWithoutAFile.new(@site, @site.source, '.objects', "#{object}.json").tap do |file|
        file.content = JSON.pretty_generate(@site.data[object.to_s])
        file.data.merge!(
          'layout' => nil,
          'sitemap' => false,
        )

        file.output
      end

      @site.pages << page
    end
  end
end

require 'jekyll/commands/zettel'
require 'jekyll/zettel/references'
require 'jekyll/zettel/reference'
require 'jekyll/zettel/timeline'
require 'jekyll/zettel/tags'
require 'jekyll/zettel/zettelkasten'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jekyll-zettel-0.5.0 lib/jekyll/zettel.rb
jekyll-zettel-0.4.3 lib/jekyll/zettel.rb
jekyll-zettel-0.4.2 lib/jekyll/zettel.rb
jekyll-zettel-0.4.1 lib/jekyll/zettel.rb
jekyll-zettel-0.4.0 lib/jekyll/zettel.rb