81 lines
2.3 KiB
Markdown
81 lines
2.3 KiB
Markdown
<h1>Introduction to Mdbook and Hero Mdbook</h1>
|
|
|
|
<h2>Table of Contents</h2>
|
|
|
|
- [Introduction](#introduction)
|
|
- [Installation](#installation)
|
|
- [MacOS or Linux](#macos-or-linux)
|
|
- [Windows](#windows)
|
|
- [Create a New Mdbook](#create-a-new-mdbook)
|
|
- [More Information](#more-information)
|
|
|
|
---
|
|
|
|
## Introduction
|
|
|
|
We introduce Mdbook and Hero Mdbook.
|
|
|
|
## Installation
|
|
|
|
### MacOS or Linux
|
|
|
|
- Install Brew
|
|
```
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
```
|
|
- Install cargo
|
|
```
|
|
brew install --cask cargo
|
|
```
|
|
- Install mdbook
|
|
```
|
|
cargo install mdbook
|
|
```
|
|
|
|
### Windows
|
|
|
|
- Install Chocolatey
|
|
- To install Chocolatey on Windows, we follow the [official Chocolatey website](https://chocolatey.org/install) instructions.
|
|
|
|
* Run PowerShell as Administrator
|
|
* Check if **Get-ExecutionPolicy** is restricted
|
|
* ```
|
|
Get-ExecutionPolicy
|
|
```
|
|
* If it is restricted, run the following command:
|
|
* ```
|
|
Set-ExecutionPolicy AllSigned
|
|
```
|
|
* Install Chocolatey
|
|
* ```
|
|
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
|
```
|
|
* Note: You might need to restart PowerShell to use Chocolatey
|
|
- Install Mdbook
|
|
- ```
|
|
choco install mdbook
|
|
```
|
|
|
|
## Create a New Mdbook
|
|
|
|
- Open a terminal
|
|
- Create a new directory
|
|
```
|
|
mkdir -p mdbook_folder
|
|
cd mdbook_folder
|
|
```
|
|
- Initialize an mdbook book
|
|
```
|
|
mdbook init
|
|
```
|
|
- Create new sections with SUMMARY.md
|
|
- Populate the content in the `src` folder
|
|
|
|
## More Information
|
|
|
|
- [Basics of Git and GitHub](https://manual.grid.tf/documentation/system_administrators/computer_it_basics/git_github_basics.html)
|
|
- [Basics of Gitea](https://manual.grid.tf/documentation/system_administrators/computer_it_basics/gitea/gitea_toc.html)
|
|
- [Basics of Docker](https://manual.grid.tf/documentation/system_administrators/computer_it_basics/docker_basics.html)
|
|
- [Update an mdbook on a GitHub repo](https://manual.grid.tf/knowledge_base/collaboration/contribute.html)
|
|
- [Deploy a Hero Mdbook on Docker](./hero_mdbook_docker.md)
|
|
- [Create a Hero Mdbook](./hero_create_mdbook.md) |