diff options
author | 2024-04-24 12:33:52 +0200 | |
---|---|---|
committer | 2024-04-25 11:33:30 +0200 | |
commit | 680875a611fa8f3f8e20a9e837e68c0060981ca0 (patch) | |
tree | b2e0156c83fb520fae3814b8c6d1054ec36957c2 | |
parent | 94e686f66f749b834ff3e6c50d14b0f12ff457e0 (diff) | |
download | hyde-680875a611fa8f3f8e20a9e837e68c0060981ca0.tar.gz hyde-680875a611fa8f3f8e20a9e837e68c0060981ca0.zip |
Add baseHref option
-rwxr-xr-x | hyde.rb | 1 | ||||
-rw-r--r-- | optparser.rb | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -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 |