The WorksAudit Book
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode

Quick Start

This book is basically a collection of markdown documents to be generated and organized as static HTMLs by HUGO static-site generator.

Getting Started

Here are some information to get you started in contributing contents and pages to the book:

  1. 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.
  2. Clone the book repository: wap-audit-book.
  3. Add new page by executing the following command in the root of the project:
    hugo new [page-category]/[page-name].md
    
  4. 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. Press Ctrl-C to stop the server.
  5. Push your update to the repo to kick CI/CD to publish it immediately on https://book.audit-dev.worksap.com/

Editing Basics

Front Matter

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.

Category Folder Convention

  1. Page categories are represented by folders. Name a page category with all lower-case, and use hyphen (-) as word separators instead of spaces. For example Book Maintenance should be named as book-maintenance.
  2. 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.
    ---
    title: Book Maintenance
    weight: -20
    ---
    
    This will make the folder name looks pretty in the index.

Images

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.