To preview or build the website, we can either use Batect, or the terminal. See the respective sections below for requirements.
To make changes edit the source files in the source
folder.
Although a single page of HTML is generated the markdown is spread across
multiple files to make it easier to manage. They can be found in
source/documentation
.
A new markdown file isn't automatically included in the generated output. If we
add a new markdown file at the location source/documentation/agile/scrum.md
,
the following snippet in source/index.html.md.erb
, includes it in the
generated output.
<%= partial 'documentation/agile/scrum' %>
Including files manually like this lets us specify the position they appear in the page.
To add a completely new page, create a file with a .html.md
extension in the /source
directory.
For example, source/about.html.md
will be accessible on http://localhost:4567/about.html.
To live preview:
./batect preview
The local URL and port where the files can be previewed will be output, this is normally http://localhost:4567.
NB The first time this is run it builds the Docker image and installs dependencies so may take 5 mins. Subsequent runs will be much quicker.
Requirements:
- [Ruby Version Manager][rbenv]
- [Node Version Manager][nodenv]
To live preview:
bundle install
bundle exec middleman serve
The local URL and port where the files can be previewed will be output, this is normally http://localhost:4567.
Requirements:
- Scala/sbt
./batect build
If you don't wish to use batect and have Ruby 3.0.2 installed:
bundle install
bundle exec middleman build --build-dir=public/ --clean
bundle inst
sbt run
The local URL and port where the files can be previewed will be output, this is normally http://localhost:9000.
This code is open source software licensed under the Apache 2.0 License.