From 84110306fee8e35b737d9a46e2c845ec23a5f187 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 17 Dec 2023 14:43:23 +0530 Subject: [PATCH] Update Install docs --- .../posts/papermod/papermod-installation.md | 106 ++++++++++++------ 1 file changed, 71 insertions(+), 35 deletions(-) diff --git a/content/posts/papermod/papermod-installation.md b/content/posts/papermod/papermod-installation.md index 08ca8008..a6678538 100644 --- a/content/posts/papermod/papermod-installation.md +++ b/content/posts/papermod/papermod-installation.md @@ -12,66 +12,79 @@ cover: hiddenInList: true --- -## Intro - -- **We'll be using `yml/yaml` format for all examples down below, I recommend using `yml` over `toml` as it is easier to read.** -- You can find any [YML to TOML](https://www.google.com/search?q=yml+to+toml) converters if necessary. +> - **We'll be using `yml/yaml` format for all examples down below, it is recommend to use `yaml` over `toml` as it is easier to read.** +> - You can find any [YML to TOML](https://www.google.com/search?q=yml+to+toml) converters if needed. --- -## Guide +## Getting Started 🚀 -Follow [Quick Start](https://gohugo.io/getting-started/quick-start/) guide to setup {{< inTextImg url="https://raw.githubusercontent.com/gohugoio/hugoDocs/master/static/img/hugo-logo.png" height="14" >}} and create a new site. +1. Follow **[Hugo Docs's - Quick Start](https://gohugo.io/getting-started/quick-start/)** guide to install {{< inTextImg url="https://raw.githubusercontent.com/gohugoio/hugoDocs/master/static/img/hugo-logo.png" height="14" >}}. +
(Make sure you install **Hugo >= v0.112.4**) -> Note: Use -f to select yml format -> -> `hugo new site --format yaml` +2. Create a new {{< inTextImg url="https://raw.githubusercontent.com/gohugoio/hugoDocs/master/static/img/hugo-logo.png" height="14" >}} site + ```sh + hugo new site MyFreshWebsite --format yaml + # replace MyFreshWebsite with name of your website + ``` + Note: + - Older versions of Hugo may not support `--format yaml` + - Read more here about [Hugo Docs's - hugo new site command](https://gohugo.io/commands/hugo_new_site/#synopsis) -Make sure you install latest version of **`hugo(>=0.83.0)`**. +After you have created a new site, follow the below steps to add **PaperMod** -After you have created a new site, at [Step 3](https://gohugo.io/getting-started/quick-start/#step-3-add-a-theme) follow the steps: +### Installing/Updating PaperMod -### Method 1 +- Themes reside in `MyFreshWebsite/themes` directory. +- PaperMod will be installed in `MyFreshWebsite/themes/PaperMod` -Inside the folder of your Hugo site, run: +> {{< collapse summary="**Expand Method 1 - Git Clone**" >}} + +**INSTALL** : Inside the folder of your Hugo site `MyFreshWebsite`, run: ```bash git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1 ``` -**Note**: You may use ` --branch v5.0` to end of above command if you want to stick to specific release. +You may use ` --branch v7.0` to end of above command if you want to stick to specific release. -> Updating theme : -> -> ```bash -> cd themes/PaperMod -> git pull -> ``` +**UPDATE**: Inside the folder of your Hugo site `MyFreshWebsite`, run: -### Method 2 +```bash +cd themes/PaperMod +git pull +``` -you can use as [submodule](https://www.atlassian.com/git/tutorials/git-submodule) with +{{}} + +> {{< collapse summary="**Expand Method 2 - Git Submodule (recomended)**" >}} + +**INSTALL** : Inside the folder of your Hugo site `MyFreshWebsite`, run: ```bash git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod git submodule update --init --recursive # needed when you reclone your repo (submodules may not get cloned automatically) ``` -**Note**: You may use ` --branch v5.0` to end of above command if you want to stick to specific release. +You may use ` --branch v7.0` to end of above command if you want to stick to specific release. +Read more about git submodules [here](https://www.atlassian.com/git/tutorials/git-submodule). -> Updating theme : -> -> ```bash -> git submodule update --remote --merge -> ``` +**UPDATE**: Inside the folder of your Hugo site `MyFreshWebsite`, run: -### Method 3 +```bash +git submodule update --remote --merge +``` -Or you can Download as Zip from Github Page and extract in your themes directory +{{}} + +> {{< collapse summary="**Expand Method 3 - Download an unzip**" >}} + +Download PaperMod source as Zip from Github Releases and extract in your themes directory at `MyFreshWebsite/themes/PaperMod` Direct Links: - [Master Branch (Latest)](https://github.com/adityatelange/hugo-PaperMod/archive/master.zip) +- [v7.0](https://github.com/adityatelange/hugo-PaperMod/archive/v7.0.zip) - [v6.0](https://github.com/adityatelange/hugo-PaperMod/archive/v6.0.zip) - [v5.0](https://github.com/adityatelange/hugo-PaperMod/archive/v5.0.zip) - [v4.0](https://github.com/adityatelange/hugo-PaperMod/archive/v4.0.zip) @@ -79,7 +92,11 @@ Direct Links: - [v2.0](https://github.com/adityatelange/hugo-PaperMod/archive/v2.0.zip) - [v1.0](https://github.com/adityatelange/hugo-PaperMod/archive/v1.0.zip) -### Method 4 +{{}} + +> {{< collapse summary="**Expand Method 4 - Hugo module**" >}} + +**INSTALL** : - Install [Go programming language](https://go.dev/doc/install) in your operating system. @@ -97,20 +114,39 @@ module: - path: github.com/adityatelange/hugo-PaperMod ``` -- Update theme +**UPDATE**: ``` hugo mod get -u ``` -### Finally ... +Read more : [Hugo Docs's - HUGO MODULES](https://gohugo.io/hugo-modules/use-modules/) -Add in `config.yml`: +{{}} + +### Finally set theme as PaperMod in your site config + +In `config.yml` add: ```yml {linenos=true} -theme: "PaperMod" +theme: ["PaperMod"] ``` +### Next up - Customizing PaperMod to suit your preferences. + +- Your site will be blank after you set up for the very first time. +- You may go through this website's source code - [PaperMod's exampleSite's souce](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) +- Scroll below this page where you will find more specific details about each section. +- Kindly go through all of the pages below to know how to configure PaperMod. + +--- + +## Support 🫶 + +- Star 🌟 PaperMod's Github repository. +- Help spread the word about PaperMod by sharing it on social media and recommending it to your friends. 🗣️ +- You can also sponsor 🏅 on [Github Sponsors](https://github.com/sponsors/adityatelange) / [Ko-Fi](https://ko-fi.com/adityatelange). + --- ## Videos featuring PaperMod