Class: Blogdown::Cli::CommandLine
- Inherits:
-
Thor
- Object
- Thor
- Blogdown::Cli::CommandLine
- Defined in:
- lib/blogdown/cli.rb
Overview
Commandline app for blogdown
Instance Method Summary collapse
Instance Method Details
#build ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/blogdown/cli.rb', line 7 def build # Builds html files from markdown files, located in output # and posts folders respectively begin publisher=Blogdown::Publisher.new(Dir.pwd) publisher.compose rescue Exception=>e puts e. end end |
#server ⇒ Object
19 20 21 22 23 24 |
# File 'lib/blogdown/cli.rb', line 19 def server # Runs Sinatra built in server on the project root drectory ENV['BD']=Dir.pwd build Blogdown::PreviewApp.run! end |