Create Site Specification
Create a site specifcation file sitespec.rb:
require 'buildmaster' # page layout in YAML PAGE_LAYOUT = <<CONTENT title_header: HTML Title - css_path: path_to_css_file.css logo: text: Fitnesse Task menu_groups: - title: Software menu_items: - title: Download link: download.html - title: License link: license.html CONTENT # site spec regarding the content directory, output directory and page layout SITE_SPEC = BuildMaster::SiteSpec.new(__FILE__) do |spec| spec.output_dir = 'output' spec.content_dir = 'docs' spec.page_layout = PAGE_LAYOUT end site = BuildMaster::Site.new(SITE_SPEC) site.execute(ARGV)
Create Content
Let’s start by creating index.textile as the first content. The textile extention tells
BuildMaster the format of the content. You can also create an index.html if you
prefer writing the content in HTML, or index.markdown for MarkDown.
Optionally you can specify the title of the page with the header. This is a BuildMaster specific syntax but it has turned out to be very useful.
------------------------------------- Home Page Title ------------------------------------- h1. Header Hello @BuildMaster@ World!
For full reference on textile notation, see Textile Reference
Build the Site
Build the site by typing the following command and the HTML files will be generated in the output_dir that you
have specified in the site specification.
ruby sitespec.rb server
This will start an HTTP server that serves files based on content directory. Just point your browser to
“http://localhost:2000”.
For more information, including running the server and testing the website, see Build Site References