From ebaea4ad54d05ce61e178573e78a8cdfcead052e Mon Sep 17 00:00:00 2001 From: mik-tf Date: Tue, 22 Oct 2024 23:39:15 -0400 Subject: [PATCH] added basic mdbook docs --- docs/mdbook_basics.md | 86 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 docs/mdbook_basics.md diff --git a/docs/mdbook_basics.md b/docs/mdbook_basics.md new file mode 100644 index 0000000..89f565e --- /dev/null +++ b/docs/mdbook_basics.md @@ -0,0 +1,86 @@ +

Introduction to Mdbook and Hero Mdbook

+ +

Table of Contents

+ +- [Introduction](#introduction) +- [Installation](#installation) + - [MacOS or Linux](#macos-or-linux) + - [Windows](#windows) + - [Install Chocolatey](#install-chocolatey) + - [Install Mdbook](#install-mdbook) +- [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 + +- Update an mdbook on a GitHub repo + - https://manual.grid.tf/knowledge_base/collaboration/contribute.html +- Deploy a Hero Mdbook on Docker + - https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/development/docs/hero_mdbook_docker.md +- Create a Hero Mdbook + - https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/development/docs/hero_create_mdbook.md \ No newline at end of file -- 2.40.1