File: build_options.rb

package info (click to toggle)
ruby-jekyll-data 1.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 420 kB
  • sloc: ruby: 909; sh: 95; makefile: 10
file content (19 lines) | stat: -rw-r--r-- 477 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Jekyll
  class Command
    class << self
      #
      # patch original method to inject a '--show-data' switch to display
      # merged data hash
      #
      alias_method :original_build_options, :add_build_options

      def add_build_options(cmd)
        original_build_options(cmd)
        cmd.option "show-data", "--show-data",
                   "Print merged site-data hash when used with --verbose."
      end
    end
  end
end