From 680875a611fa8f3f8e20a9e837e68c0060981ca0 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Wed, 24 Apr 2024 12:33:52 +0200 Subject: Add baseHref option --- hyde.rb | 1 + optparser.rb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/hyde.rb b/hyde.rb index 3e5d6bb..828c7a2 100755 --- a/hyde.rb +++ b/hyde.rb @@ -28,6 +28,7 @@ class Hyde def self.main # Parse arguments from the CLI options = HydeOptionParser.parse + page = Page.new(options[:fileName], nil, options[:baseHref]) end end diff --git a/optparser.rb b/optparser.rb index 7740f7f..35704f6 100644 --- a/optparser.rb +++ b/optparser.rb @@ -30,6 +30,9 @@ class HydeOptionParser option.on("-n", "--page-name NAME", "Page name") { |o| options[:pageNames] = o } + option.on("-b", "--base-href HREF", "The base HREF") { + |o| options[:baseHref] = o + } option.on_tail("-h", "--help", "Show this message") do puts option exit -- cgit v1.2.3