Skip to content

Commit

Permalink
Update Install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adityatelange committed Dec 17, 2023
1 parent c3a4965 commit 8411030
Showing 1 changed file with 71 additions and 35 deletions.
106 changes: 71 additions & 35 deletions content/posts/papermod/papermod-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,74 +12,91 @@ 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 🚀

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" >}}.
<br>(Make sure you install **Hugo >= v0.112.4**)

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.
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)

> Note: Use -f to select yml format
>
> `hugo new site <name of site> --format yaml`
After you have created a new site, follow the below steps to add **PaperMod**

Make sure you install latest version of **`hugo(>=0.83.0)`**.
### Installing/Updating 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:
- Themes reside in `MyFreshWebsite/themes` directory.
- PaperMod will be installed in `MyFreshWebsite/themes/PaperMod`

### Method 1
> {{< collapse summary="**Expand Method 1 - Git Clone**" >}}
Inside the folder of your Hugo site, run:
**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.

**UPDATE**: Inside the folder of your Hugo site `MyFreshWebsite`, run:

```bash
cd themes/PaperMod
git pull
```

> Updating theme :
>
> ```bash
> cd themes/PaperMod
> git pull
> ```
{{</ collapse >}}

### Method 2
> {{< collapse summary="**Expand Method 2 - Git Submodule (recomended)**" >}}
you can use as [submodule](https://www.atlassian.com/git/tutorials/git-submodule) with
**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).

**UPDATE**: Inside the folder of your Hugo site `MyFreshWebsite`, run:

```bash
git submodule update --remote --merge
```

> Updating theme :
>
> ```bash
> git submodule update --remote --merge
> ```
{{</ collapse >}}

### Method 3
> {{< collapse summary="**Expand Method 3 - Download an unzip**" >}}
Or you can Download as Zip from Github Page and extract in your themes directory
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)
- [v3.0](https://github.com/adityatelange/hugo-PaperMod/archive/v3.0.zip)
- [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 >}}

> {{< collapse summary="**Expand Method 4 - Hugo module**" >}}
**INSTALL** :

- Install [Go programming language](https://go.dev/doc/install) in your operating system.

Expand All @@ -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/)

{{</ collapse >}}

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
Expand Down

0 comments on commit 8411030

Please sign in to comment.