Skip to content

Commit ba6dbfd

Browse files
committed
- Remove some styling related command line flags
1 parent d08806a commit ba6dbfd

3 files changed

Lines changed: 4 additions & 79 deletions

File tree

lib/madness/command_line.rb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,8 @@ def set_config(args)
6666
config.toc = args['--toc'] if args['--toc']
6767
config.auth = args['--auth'] if args['--auth']
6868
config.auth_realm = args['--auth-realm'] if args['--auth-realm']
69-
70-
config.auto_h1 = false if args['--no-auto-h1']
71-
config.auto_nav = false if args['--no-auto-nav']
72-
config.sidebar = false if args['--no-sidebar']
73-
config.highlighter = false if args['--no-syntax']
74-
config.line_numbers = false if args['--no-line-numbers']
75-
config.copy_code = false if args['--no-copy-code']
76-
config.shortlinks = true if args['--shortlinks']
77-
config.open = true if args['--open']
78-
79-
config.theme = File.expand_path(args['--theme'], config.path) if args['--theme']
69+
config.open = true if args['--open']
70+
config.theme = File.expand_path(args['--theme'], config.path) if args['--theme']
8071
end
8172

8273
# Generate index and toc, if requested by the user.

lib/madness/docopt.txt

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,6 @@ Options:
2828
Set server listen address.
2929
(Config option: bind, default: 0.0.0.0)
3030

31-
--no-auto-h1
32-
By default, if a markdown document does not start with an H1 caption,
33-
it will be added automatically based on the file name. To disable this
34-
behavior, use --no-auto-h1.
35-
(Config option: auto_h1)
36-
37-
--no-syntax
38-
Disable code syntax highlighting.
39-
(Config option: highlighter)
40-
41-
--no-line-numbers
42-
Disable line numbering for syntax highlighter.
43-
(Config option: line_numbers)
44-
45-
--no-copy-code
46-
Disable copy to cliboard icon for code snippets.
47-
(Config option: copy_code)
48-
49-
--no-sidebar
50-
Disable sidebar navigation.
51-
(Config option: sidebar)
52-
53-
--no-auto-nav
54-
Disable automatic generation of footer navigation for folder README
55-
files.
56-
(Config option: auto_nav)
57-
58-
--shortlinks
59-
Enable support for [[Short Links]].
60-
(Config option: shortlinks)
61-
6231
--theme FOLDER
6332
Use a custom theme. FOLDER is either absolute or relative to the main
6433
documentation path.
@@ -86,13 +55,10 @@ Options:
8655
Examples:
8756
madness
8857
madness docs
89-
madness docs --no-auto-h1 -p 4567
58+
madness docs -p 4567
9059
madness docs --open
91-
madness --no-sidebar --no-auto-nav
9260
madness --toc "Table of Contents.md" --and-quit
9361
madness --auth user:secret --port 4000
9462
madness --theme _mytheme
9563
madness create config
9664
madness create theme
97-
98-

spec/fixtures/cli/help

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,6 @@ Options:
2828
Set server listen address.
2929
(Config option: bind, default: 0.0.0.0)
3030

31-
--no-auto-h1
32-
By default, if a markdown document does not start with an H1 caption,
33-
it will be added automatically based on the file name. To disable this
34-
behavior, use --no-auto-h1.
35-
(Config option: auto_h1)
36-
37-
--no-syntax
38-
Disable code syntax highlighting.
39-
(Config option: highlighter)
40-
41-
--no-line-numbers
42-
Disable line numbering for syntax highlighter.
43-
(Config option: line_numbers)
44-
45-
--no-copy-code
46-
Disable copy to cliboard icon for code snippets.
47-
(Config option: copy_code)
48-
49-
--no-sidebar
50-
Disable sidebar navigation.
51-
(Config option: sidebar)
52-
53-
--no-auto-nav
54-
Disable automatic generation of footer navigation for folder README
55-
files.
56-
(Config option: auto_nav)
57-
58-
--shortlinks
59-
Enable support for [[Short Links]].
60-
(Config option: shortlinks)
61-
6231
--theme FOLDER
6332
Use a custom theme. FOLDER is either absolute or relative to the main
6433
documentation path.
@@ -86,9 +55,8 @@ Options:
8655
Examples:
8756
madness
8857
madness docs
89-
madness docs --no-auto-h1 -p 4567
58+
madness docs -p 4567
9059
madness docs --open
91-
madness --no-sidebar --no-auto-nav
9260
madness --toc "Table of Contents.md" --and-quit
9361
madness --auth user:secret --port 4000
9462
madness --theme _mytheme

0 commit comments

Comments
 (0)