Quick Start
This book is basically a collection of markdown documents to be generated and organized as static HTMLs by HUGO static-site generator.
Here are some information to get you started in contributing contents and pages to the book:
- Although to start writing documents you don’t necessarily need to install HUGO, it’d' be preferrable to have it locally. This document assumes that you have HUGO installed locally. Please follow official documentation on how to install it.
- Clone the book repository: wap-audit-book.
- Add new page by executing the following command in the root of the project:
hugo new [page-category]/[page-name].md
- To see how the page you created will look like, run the server locally:
hugo server -D
-D
is specified so that draft documents will also be rendered. PressCtrl-C
to stop the server. - Push your update to the repo to kick CI/CD to publish it immediately on https://book.audit-dev.worksap.com/
All markdown pages managed by HUGO should have the front matter at the top of the page. The front matter is automatically generated when you use hugo new
command. Make sure you adjust the values of the variables accordingly:
---
title: "Quick Start"
date: 2021-12-07T11:07:37+09:00
draft: true
weight: 100
---
If the page is ready to be published, don’t forget to set draft
variable to false
.
- Page categories are represented by folders. Name a page category with all lower-case, and use hyphen (
-
) as word separators instead of spaces. For exampleBook Maintenance
should be named asbook-maintenance
. - Create a file called
_index.md
for a new folder that you created, and specify a front matter that described the pretty-name of the category, e.g.
This will make the folder name looks pretty in the index.--- title: Book Maintenance weight: -20 ---
To add image to your page, put your image in the /static
directory, then reference it this way:
![Example image](/image.png)
All images you put under /static
directory will goes to the root directory on distribution.