Class: Jets::Commands::Markdown::Index

Inherits:
Object
  • Object
show all
Defined in:
lib/jets/commands/markdown/index.rb

Instance Method Summary collapse

Instance Method Details

#command_listObject



7
8
9
10
11
12
13
14
# File 'lib/jets/commands/markdown/index.rb', line 7

def command_list
  commands = Jets::Commands::Base.namespaced_commands.sort.reject {|c| c.include?('help') }
  commands.map do |full_command|
    # Example: [jets deploy]({% link _reference/jets-deploy.md %})
    link = full_command.gsub(':','-')
    "* [jets #{full_command}]({% link _reference/jets-#{link}.md %})"
  end.join("\n")
end

#docObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/jets/commands/markdown/index.rb', line 16

def doc
  <<-EOL
---
title: CLI Reference
---
{% include reference.md %}

#{command_list}
EOL
end

#pathObject



3
4
5
# File 'lib/jets/commands/markdown/index.rb', line 3

def path
  "docs/reference.md"
end