ync wiki with examplesite docs

Aditya Telange
2024-01-26 13:07:49 +05:30
parent 12a617bc5e
commit 859826c052
6 changed files with 368 additions and 310 deletions

55
FAQs.md

@@ -1,6 +1,5 @@
## ToC ## ToC
- [Intro](#intro)
- [Override theme template](#override-theme-template) - [Override theme template](#override-theme-template)
- [Enable Social-Metadata and SEO](#enable-social-metadata-and-seo) - [Enable Social-Metadata and SEO](#enable-social-metadata-and-seo)
- [Failed to find a valid digest in the 'integrity' attribute for resource ... ?](#failed-to-find-a-valid-digest-in-the-integrity-attribute-for-resource--) - [Failed to find a valid digest in the 'integrity' attribute for resource ... ?](#failed-to-find-a-valid-digest-in-the-integrity-attribute-for-resource--)
@@ -12,15 +11,14 @@
- [Centering image in markdown](#centering-image-in-markdown) - [Centering image in markdown](#centering-image-in-markdown)
- [Using Hugo's Syntax highlighter "chroma"](#using-hugos-syntax-highlighter-chroma) - [Using Hugo's Syntax highlighter "chroma"](#using-hugos-syntax-highlighter-chroma)
- [Posts from only one folder/section visible on home page?](#posts-from-only-one-foldersection-visible-on-home-page) - [Posts from only one folder/section visible on home page?](#posts-from-only-one-foldersection-visible-on-home-page)
- [Search not working ?](#search-not-working-)
- [References](#references) - [References](#references)
--- ---
## 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.**
>
- **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.
- You can find any [YML to TOML](https://www.google.com/search?q=yml+to+toml) converters if necessary.
--- ---
@@ -49,7 +47,7 @@ When Hugo builds your site, your copy of `list.html` will be used instead of the
These include OpenGraph, Twitter Cards and Schema. These include OpenGraph, Twitter Cards and Schema.
```yml ```yml {linenos=true}
params: params:
env: production env: production
``` ```
@@ -68,7 +66,7 @@ Why was the `asset` not loading ? : [How_browsers_handle_Subresource_Integrity](
Set the following in `config.yml` Set the following in `config.yml`
```yml ```yml {linenos=true}
params: params:
assets: assets:
disableFingerprinting: true disableFingerprinting: true
@@ -141,7 +139,7 @@ You can add menu entries which will appear in the header of every page.
To do so, add a `menu` section to your site's `config.yml`: To do so, add a `menu` section to your site's `config.yml`:
```yml ```yml {linenos=true}
menu: menu:
main: main:
- identifier: categories - identifier: categories
@@ -172,7 +170,7 @@ Post can be pinned/ displayed top on the list by adding a `weight=<num>` var to
example: example:
```yml ```yml {linenos=true}
--- ---
title: "My Important post" title: "My Important post"
date: 2020-09-15T11:30:03+00:00 date: 2020-09-15T11:30:03+00:00
@@ -180,7 +178,7 @@ weight: 1
--- ---
``` ```
```yml ```yml {linenos=true}
--- ---
title: "My 2nd Important post" title: "My 2nd Important post"
date: 2020-09-15T11:30:03+00:00 date: 2020-09-15T11:30:03+00:00
@@ -201,15 +199,13 @@ and can be added accordingly.
- `apple-touch-icon.png` - `apple-touch-icon.png`
- `safari-pinned-tab.svg` - `safari-pinned-tab.svg`
1. Favicon(s) can be generated by [Favicon.io](https://favicon.io) 1. Favicon(s) can be generated by [Favicon.io](https://favicon.io) and can be simply put in `/static` folder.
and can be simply put in `/static` folder.
2. Other way is to add favicon(s) NOT located in `/static` folder. 2. Other way is to add favicon(s) NOT located in `/static` folder.
In site config add the following: In site config add the following:
``` ```yml {linenos=true}
params: params:
assets: assets:
favicon: "<link / absolute url>" favicon: "<link / absolute url>"
@@ -219,11 +215,9 @@ and can be added accordingly.
safari_pinned_tab: "<link / absolute url>" safari_pinned_tab: "<link / absolute url>"
``` ```
- `absolute url` means direct links to external resource: ex. https://web.site/someimage.png Note: `absolute url` means direct links to external resource: ex. `https://web.site/someimage.png`
example: ```yml {linenos=true}
```
params: params:
assets: assets:
favicon: "/favicon.ico" favicon: "/favicon.ico"
@@ -239,7 +233,7 @@ and can be added accordingly.
Add `#center` after image to center align an image Add `#center` after image to center align an image
```md ```md {linenos=true}
![name](path/to/image.png#center) ![name](path/to/image.png#center)
``` ```
@@ -247,10 +241,8 @@ Add `#center` after image to center align an image
use `align=center` to center image with captions use `align=center` to center image with captions
ex. ```md {linenos=true}
{{</* figure align=center src="image.jpg" */>}}
```md
{{< figure align=center src="image.jpg" >}}
``` ```
--- ---
@@ -259,7 +251,7 @@ ex.
1. Disable Highlight.js in site `config.yml` 1. Disable Highlight.js in site `config.yml`
```yml ```yml {linenos=true}
params: params:
assets: assets:
disableHLJS: true disableHLJS: true
@@ -267,7 +259,7 @@ ex.
2. Set hugo's markdown styling in site `config.yml` 2. Set hugo's markdown styling in site `config.yml`
```yml ```yml {linenos=true}
markup: markup:
highlight: highlight:
# anchorLineNos: true # anchorLineNos: true
@@ -284,17 +276,12 @@ ex.
Add the following to `assets/css/extended/custom.css` Add the following to `assets/css/extended/custom.css`
```css ```css {linenos=true}
.chroma { .chroma {
background-color: unset !important; background-color: unset;
} }
``` ```
You can use, for ex.
```sh
hugo gen chromastyles --style dracula > assets/css/extended/dracula.css
```
More Info : [Configure Markup - Highlight](https://gohugo.io/getting-started/configuration-markup#highlight) More Info : [Configure Markup - Highlight](https://gohugo.io/getting-started/configuration-markup#highlight)
--- ---
@@ -311,7 +298,7 @@ We have used this insted of assigning `baseURL` so as to work with multilingual
To fix for _single_ language websites hosting assets from CDN, this you may [override](#override-theme-template) [fastsearch.js#L35](https://github.com/adityatelange/hugo-PaperMod/blob/fb4988cfb6d0d6e4e489f17d89f0fa618def3396/assets/js/fastsearch.js#L35) and placing appropriate URL as in To fix for _single_ language websites hosting assets from CDN, this you may [override](#override-theme-template) [fastsearch.js#L35](https://github.com/adityatelange/hugo-PaperMod/blob/fb4988cfb6d0d6e4e489f17d89f0fa618def3396/assets/js/fastsearch.js#L35) and placing appropriate URL as in
```js ```js {linenos=true}
xhr.open("GET", "https://example.com/index.json"); xhr.open("GET", "https://example.com/index.json");
``` ```

@@ -21,6 +21,8 @@
- [Comments](#comments) - [Comments](#comments)
- [AccessKeys](#accesskeys) - [AccessKeys](#accesskeys)
- [Enhanced SEO](#enhanced-seo) - [Enhanced SEO](#enhanced-seo)
- [Twitter Cards Support](#twitter-cards-support)
- [OpenGraph support](#opengraph-support)
- [Multilingual Support](#multilingual-support) - [Multilingual Support](#multilingual-support)
- [Misc](#misc) - [Misc](#misc)
- [Scroll-Bar themed (by default)](#scroll-bar-themed-by-default) - [Scroll-Bar themed (by default)](#scroll-bar-themed-by-default)
@@ -34,11 +36,9 @@ View demo [here](https://adityatelange.github.io/hugo-PaperMod/)
--- ---
## 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.**
>
- **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.
- You can find any [YML to TOML](https://www.google.com/search?q=yml+to+toml) converters if necessary.
--- ---
@@ -54,7 +54,7 @@ The following is enabled by default
### Default Theme light/dark/auto ### Default Theme light/dark/auto
```yml ```yml {linenos=true}
params: params:
# defaultTheme: light # defaultTheme: light
# defaultTheme: dark # defaultTheme: dark
@@ -71,7 +71,7 @@ Shows icon besides title of page to change theme
To disable it : To disable it :
```yml ```yml {linenos=true}
disableThemeToggle: true disableThemeToggle: true
``` ```
@@ -112,7 +112,6 @@ layout: "archives"
url: "/archives/" url: "/archives/"
summary: archives summary: archives
--- ---
``` ```
**Note:** Archives Layout does not support Multilingual Month Translations. **Note:** Archives Layout does not support Multilingual Month Translations.
@@ -158,7 +157,7 @@ Shows Index/Home page as Full Page with Social Links and Image
add following to config file add following to config file
```yml ```yml {linenos=true}
params: params:
profileMode: profileMode:
enabled: true enabled: true
@@ -185,36 +184,34 @@ params:
### Search Page ### Search Page
PaperMod uses [Fuse.js Basic](https://fusejs.io/getting-started/different-builds.html#explanation-of-different-builds) for seach functionality PaperMod uses [Fuse.js Basic](https://fusejs.io/getting-started/different-builds.html#explanation-of-different-builds) for search functionality
Add the following to site config, `config.yml` Add the following to site config, `config.yml`
```yml ```yml {linenos=true,hl_lines=[5]}
outputs: outputs:
home: home:
- HTML - HTML
- RSS - RSS
- JSON # is necessary - JSON # necessary for search
``` ```
Create a page with `search.md` in `content` directory with following content Create a page with `search.md` in `content` directory with following content
```yml ```yml {linenos=true,hl_lines=[3]}
--- ---
title: "Search" # in any language you want title: "Search" # in any language you want
layout: "search" # is necessary layout: "search" # necessary for search
# url: "/archive" # url: "/archive"
# description: "Description for Search" # description: "Description for Search"
summary: "search" summary: "search"
placeholder: "placeholder text in search input box" placeholder: "placeholder text in search input box"
--- ---
``` ```
To hide a particular page from being searched, add it in post's fron't matter To hide a particular page from being searched, add it in post's frontmatter
```yml ```yml {linenos=true}
---
searchHidden: true searchHidden: true
``` ```
@@ -223,7 +220,7 @@ ex: [search.md](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/ex
> Search Page also has Key bindings: > Search Page also has Key bindings:
> >
> - Arrow keys to move up/down the list > - Arrow keys to move up/down the list
> - Enter key (return) or Right Arrow key to Go to highlighted page > - Enter key (return) or Right Arrow key to go to the highlighted page
> - Escape key to clear searchbox and results > - Escape key to clear searchbox and results
For Multilingual use `search.<lang>.md` ex. `search.es.md`. For Multilingual use `search.<lang>.md` ex. `search.es.md`.
@@ -234,7 +231,7 @@ For Multilingual use `search.<lang>.md` ex. `search.es.md`.
Refer https://fusejs.io/api/options.html for Options, Add those as shown below. Refer https://fusejs.io/api/options.html for Options, Add those as shown below.
```yml ```yml {linenos=true}
params: params:
fuseOpts: fuseOpts:
isCaseSensitive: false isCaseSensitive: false
@@ -243,6 +240,7 @@ params:
distance: 1000 distance: 1000
threshold: 0.4 threshold: 0.4
minMatchCharLength: 0 minMatchCharLength: 0
# limit: 10 # refer: https://www.fusejs.io/api/methods.html#search
keys: ["title", "permalink", "summary", "content"] keys: ["title", "permalink", "summary", "content"]
``` ```
@@ -258,7 +256,7 @@ adds `[draft]` mark to indicate draft pages.
In post's page-variables add : In post's page-variables add :
```yml ```yml {linenos=true}
cover: cover:
image: "<image path/url>" image: "<image path/url>"
# can also paste direct link from external site # can also paste direct link from external site
@@ -272,7 +270,7 @@ When you include images in the [Page Bundle](https://gohugo.io/content-managemen
To reduce generation time and size of the site, you can disable this feature using To reduce generation time and size of the site, you can disable this feature using
```yml ```yml {linenos=true}
params: params:
cover: cover:
responsiveImages: false responsiveImages: false
@@ -280,7 +278,7 @@ params:
To enable hyperlinks to the full image size on post pages, use To enable hyperlinks to the full image size on post pages, use
```yml ```yml {linenos=true}
params: params:
cover: cover:
linkFullImages: true linkFullImages: true
@@ -341,13 +339,12 @@ params:
ShowBreadCrumbs: true ShowBreadCrumbs: true
``` ```
Can be disabled for particular page's front-matter Can be diabled for particular page's front-matter
```yml ```yml
--- ---
ShowBreadCrumbs: false ShowBreadCrumbs: false
--- ---
``` ```
--- ---
@@ -361,7 +358,7 @@ For site config use:
```yml ```yml
Params: Params:
editPost: editPost:
URL: "https://github.com/<gitlab user>/<repo name>/tree/<branch name>/<path to content>/" URL: "https://github.com/<path_to_repo>/content"
Text: "Suggest Changes" # edit text Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link appendFilePath: true # to append file path to Edit link
``` ```
@@ -375,17 +372,16 @@ editPost:
Text: "Suggest Changes" # edit text Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link appendFilePath: true # to append file path to Edit link
--- ---
``` ```
The example above would yield the following link for the post file `posts/post-name.md`: The example above would yield the following link for the post file `posts/post-name.md`:
https://github.com/<path_to_repo>/content/posts/post-name.md `https://github.com/<path_to_repo>/content/posts/post-name.md`
| Parameter | Required | Default Value | | Parameter | Required | Default Value |
| ----------------------- | -------- | ------------- | | ------------------------- | -------- | ------------- |
| editPost.URL | true | - | | `editPost.URL` | true | - |
| editPost.appendFilePath | false | false | | `editPost.appendFilePath` | false | `false` |
| editPost.Text | false | "Edit" | | `editPost.Text` | false | `Edit` |
Since the link generated is a regular HTML anchor tag `<a href=...>`, you can Since the link generated is a regular HTML anchor tag `<a href=...>`, you can
also use other URL schemas like `mailto://`, e.g. also use other URL schemas like `mailto://`, e.g.
@@ -423,7 +419,6 @@ To Use multiple authors for a post, in post-variables:
--- ---
author: ["Me", "You"] author: ["Me", "You"]
--- ---
``` ```
To use Multiple Authors Site-wide, in `config.yml`: To use Multiple Authors Site-wide, in `config.yml`:
@@ -474,9 +469,48 @@ t - Theme toggle
- [Rich Results/Snippets Support](https://support.google.com/webmasters/answer/7506797?hl=en) - [Rich Results/Snippets Support](https://support.google.com/webmasters/answer/7506797?hl=en)
- Twitter Cards Support #### Twitter Cards Support
- Open-Graph support - The Twitter Cards metadata, except `twitter:image` should not require
additional configuration, since it is generated from metadata that
you should already have (for instance the page title and description).
- The `twitter:image` uses the [Post Cover Image](#post-cover-image), if present.
- In the absence of a cover images, the first image from the `images`
frontmatter (a list) is used.
```yaml
images:
- image_01.png
- image_02.png
```
- Finally, if neither of those are provided, `twitter:image` comes from the first
[Page Bundle](https://gohugo.io/content-management/page-bundles/)
image with `feature` in the name, with a fallback to the first image with
`cover` or `thumbnail` in the name.
#### OpenGraph support
- The OpenGraph metadata, except `og:image` should not require
additional configuration, since it is generated from metadata that
you should already have (for instance the page title and description).
- The `og:image` uses the [Post Cover Image](#post-cover-image), if present.
- In the absence of a cover images, the first image from the `images`
frontmatter (a list) is used.
```yaml
images:
- image_01.png
- image_02.png
```
- Finally, if neither of those are provided, `og:image` comes from the first
[Page Bundle](https://gohugo.io/content-management/page-bundles/)
image with `feature` in the name, with a fallback to the first image with
`cover` or `thumbnail` in the name.
- For pages, you can also add audio (using frontmatter `audio: filename.ext`) and/or
videos.
```yaml
videos:
- filename01.mov
- filename02.avi
```
--- ---

17
Home.md

@@ -1,7 +1,6 @@
# Welcome to the PaperMod's wiki! # Welcome to the PaperMod's wiki!
Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper). > Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper).
The goal of this project is add more Features and customization to the og theme.
The [demo site](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with few more stuff. Make sure you visit it, to get the awesome hands-on experience and get known about the features ... The [demo site](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with few more stuff. Make sure you visit it, to get the awesome hands-on experience and get known about the features ...
@@ -15,16 +14,16 @@ ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hu
## Quick Links ## Quick Links
- ### [Install / Update](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation) - [Install / Update](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)
- ### [Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features) - [Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)
- ### [Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons) - [Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)
- ### [FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs) - [FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)
- ### [Variables](https://github.com/adityatelange/hugo-PaperMod/wiki/Variables) - [Variables](https://github.com/adityatelange/hugo-PaperMod/wiki/Variables)
- ### [Translations](https://github.com/adityatelange/hugo-PaperMod/wiki/Translations) - [Translations](https://github.com/adityatelange/hugo-PaperMod/wiki/Translations)
- ### [ChangeLog](https://github.com/adityatelange/hugo-PaperMod/wiki/ChangeLog) - [ChangeLog](https://github.com/adityatelange/hugo-PaperMod/wiki/ChangeLog)

@@ -78,6 +78,7 @@
| `twitch` | twitch.tv | | `twitch` | twitch.tv |
| `twitter` | twitter.com | | `twitter` | twitter.com |
| `unsplash` | unsplash.com | | `unsplash` | unsplash.com |
| `x` | x.com |
| `xda` | xda-developers.com | | `xda` | xda-developers.com |
| `xing` | xing.com | | `xing` | xing.com |
| `ycombinator` | ycombinator.com | | `ycombinator` | ycombinator.com |
@@ -86,14 +87,12 @@
Usage : Usage :
``` ```yml {linenos=true}
socialIcons: socialIcons:
- name: "kofi" - name: "kofi"
title: "<custom title>"
url: "https://kofi.com" url: "https://kofi.com"
- name: "twitter" - name: "x"
title: "<custom title>" url: "https://x.com"
url: "https://twitter.com"
``` ```
--- ---
@@ -101,8 +100,8 @@ socialIcons:
## Share Icons ## Share Icons
| Platform | | Platform |
| --------------------------------------------------------------- | | ------------------------------------------------------------------- |
| `twitter` (also generates hash tags from tags linked with post) | | `x` (also generates `#hashtags` from _tags_ linked with post) |
| `linkedin` | | `linkedin` |
| `reddit` | | `reddit` |
| `facebook` | | `facebook` |

@@ -1,124 +1,165 @@
## ToC ## ToC
- [Guide](#guide) - [Getting Started 🚀](#getting-started-)
- [Method 1](#method-1) - [Installing/Updating PaperMod](#installingupdating-papermod)
- [Method 2](#method-2) - [Finally set theme as PaperMod in your site config](#finally-set-theme-as-papermod-in-your-site-config)
- [Method 3](#method-3) - [Next up - Customizing PaperMod to suit your preferences.](#next-up---customizing-papermod-to-suit-your-preferences)
- [Finally ...](#finally-) - [Support 🫶](#support-)
- [Videos featuring Papermod](#videos-featuring-papermod) - [Videos featuring PaperMod](#videos-featuring-papermod)
- [Sample config.yml](#sample-configyml) - [Quick Links](#quick-links)
- [Sample Page.md](#sample-pagemd) - [Sample `config.yml`](#sample-configyml)
- [Sample `Page.md`](#sample-pagemd)
--- ---
## Intro > - **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.
- **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.
--- ---
## Guide ## Getting Started 🚀
> Follow [Quick Start](https://gohugo.io/getting-started/quick-start/) guide to setup hugo and create a new site. 1. Follow **[Hugo Docs's - Quick Start](https://gohugo.io/getting-started/quick-start/)** guide to install Hugo.
<br>(Make sure you install **Hugo >= v0.112.4**)
**Prerequisites** 2. Create a new Hugo site
```sh
- [Install Hugo](https://gohugo.io/installation/) - Make sure you install latest version of **`hugo(>=0.83.0)`**. hugo new site MyFreshWebsite --format yaml
- [Install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - necessary for Method 1 & 2. # replace MyFreshWebsite with name of your website
**Create a new site**
- `hugo new site <name of site> --format yaml`
- `cd <name of site>`
After you have created a new site, follow the below steps:
### Method 1
Inside the folder of your Hugo site, run:
```bash
git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1
``` ```
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**: You may use ` --branch v7.0` to end of above command if you want to stick to specific release. After you have created a new site, follow the below steps to add **PaperMod**
**Updating theme with Method 1** : ### Installing/Updating PaperMod
- Themes reside in `MyFreshWebsite/themes` directory.
- PaperMod will be installed in `MyFreshWebsite/themes/PaperMod`
> <details>
> <summary><b>Expand Method 1 - Git Clone</b></summary>
>
> **INSTALL** : Inside the folder of your Hugo site `MyFreshWebsite`, run:
>
> ```bash
> git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1
> ```
>
> 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 > ```bash
> cd themes/PaperMod > cd themes/PaperMod
> git pull > git pull
> ``` > ```
>
> </details>
### Method 2 <br>
you can use as [submodule](https://www.atlassian.com/git/tutorials/git-submodule) with
```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 v7.0` to end of above command if you want to stick to specific release.
**Updating theme with Method 2** :
> <details>
> <summary><b>Expand Method 2 - Git Submodule (recomended)</b></summary>
>
> **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)
> ```
>
> 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 > ```bash
> git submodule update --remote --merge > git submodule update --remote --merge
> ``` > ```
>
> </details>
### Method 3 <br>
You can Download as Zip from Github Page and extract in your themes directory > <details>
> <summary><b>Expand Method 3 - Download an unzip</b></summary>
>
> 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)
>
> </details>
Direct Links: <br>
- [Master Branch (Latest)](https://github.com/adityatelange/hugo-PaperMod/archive/master.zip) > <details>
- [v7.0](https://github.com/adityatelange/hugo-PaperMod/archive/v7.0.zip) > <summary><b>Expand Method 4 - Hugo module</b></summary>
- [v6.0](https://github.com/adityatelange/hugo-PaperMod/archive/v6.0.zip) >
- [v5.0](https://github.com/adityatelange/hugo-PaperMod/archive/v5.0.zip) > **INSTALL** :
- [v4.0](https://github.com/adityatelange/hugo-PaperMod/archive/v4.0.zip) >
- [v3.0](https://github.com/adityatelange/hugo-PaperMod/archive/v3.0.zip) > - Install [Go programming language](https://go.dev/doc/install) in your operating system.
- [v2.0](https://github.com/adityatelange/hugo-PaperMod/archive/v2.0.zip) >
- [v1.0](https://github.com/adityatelange/hugo-PaperMod/archive/v1.0.zip) > - Intialize your own hugo mod
>
> ```
> hugo mod init YOUR_OWN_GIT_REPOSITORY
> ```
>
> - Add PaperMod in your `config.yml` file
>
> ```go {linenos=true}
> module:
> imports:
> - path: github.com/adityatelange/hugo-PaperMod
> ```
>
> **UPDATE**:
>
> ```
> hugo mod get -u
> ```
>
> Read more : [Hugo Docs's - HUGO MODULES](https://gohugo.io/hugo-modules/use-modules/)
>
> </details>
**Updating theme with Method 3** : ### Finally set theme as PaperMod in your site config
- Download the version you wish to upgrade to and extract the new version in your themes directory at `themes/PaperMod`. In `config.yml` add:
- ex. `v6.0` is already installed, `v7.0` should be downloaded using above links and extract the new version in your themes directory at `themes/PaperMod`
### Finally ... ```yml {linenos=true}
theme: ["PaperMod"]
Add in `config.yml`:
```yml
theme: "PaperMod"
``` ```
#### Additional Method (by [#701](https://github.com/adityatelange/hugo-PaperMod/pull/701)) ### Next up - Customizing PaperMod to suit your preferences.
- Install Go programming language in your operating system. - Your site will be blank after you set up for the very first time.
- Intialize your own hugo mod - You may go through this website's source code - [PaperMod's exampleSite's souce](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite)
- ```bash - Scroll below this page where you will find more specific details about each section.
hugo mod init YOUR_OWN_GIT_REPOSITORY` - Kindly go through all of the pages below to know how to configure PaperMod.
```
- Add `PaperMod` in your `config.yml` file
- ```yaml
module:
imports:
- path: github.com/adityatelange/hugo-PaperMod
```
**Updating theme** :
```bash
hugo mod get -u
```
--- ---
## Videos featuring 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
You can go through few videos which are available on YouTube for getting to know the creator's thoughts as well as the setup process. You can go through few videos which are available on YouTube for getting to know the creator's thoughts as well as the setup process.
@@ -128,17 +169,15 @@ You can go through few videos which are available on YouTube for getting to know
## Quick Links ## Quick Links
- ### [Features](./Features) - ### [Papermod - Features](../papermod-features)
- ### [Icons](./Icons) - ### [Papermod - FAQs](../papermod-how-to)
- ### [FAQs](./FAQs) - ### [Papermod - Variables](../papermod-variables)
- ### [Variables](./Variables) - ### [Papermod - Icons](../papermod-icons)
- ### [Translations](./Translations) - ### [ChangeLog](https://github.com/adityatelange/hugo-PaperMod/releases)
- ### [ChangeLog](./ChangeLog)
--- ---
@@ -228,8 +267,8 @@ params:
Content: Welcome to my blog Content: Welcome to my blog
socialIcons: socialIcons:
- name: twitter - name: x
url: "https://twitter.com/" url: "https://x.com/"
- name: stackoverflow - name: stackoverflow
url: "https://stackoverflow.com" url: "https://stackoverflow.com"
- name: github - name: github
@@ -262,6 +301,7 @@ params:
distance: 1000 distance: 1000
threshold: 0.4 threshold: 0.4
minMatchCharLength: 0 minMatchCharLength: 0
limit: 10 # refer: https://www.fusejs.io/api/methods.html#search
keys: ["title", "permalink", "summary", "content"] keys: ["title", "permalink", "summary", "content"]
menu: menu:
main: main:
@@ -333,7 +373,7 @@ editPost:
--- ---
``` ```
You can use it by creating `archetypes/posts.md` You can use it by creating `archetypes/post.md`
```shell ```shell
hugo new --kind post <name> hugo new --kind post <name>

@@ -32,7 +32,7 @@
| `tocopen` | boolean | true \| false | To keep open ToC by default on page load | | `tocopen` | boolean | true \| false | To keep open ToC by default on page load |
| `ShowPostNavLinks` | boolean | true \| false | Show Previous and Next Posts below a Post | | `ShowPostNavLinks` | boolean | true \| false | Show Previous and Next Posts below a Post |
| `ShowBreadCrumbs` | boolean | true \| false | Show BreadCrumb Navigation above single post/page | | `ShowBreadCrumbs` | boolean | true \| false | Show BreadCrumb Navigation above single post/page |
| `ShareButtons` | list | ["linkedin", "twitter"] | To customize which share buttons to be enabled on page | | `ShareButtons` | list | ["linkedin", "x"] | To customize which share buttons to be enabled on page |
| `ShowWordCount` | boolean | true \| false | To word count to metadata | | `ShowWordCount` | boolean | true \| false | To word count to metadata |
| `ShowRssButtonInSectionTermList` | boolean | true \| false | To show RSS icon in Section, Term and List pages | | `ShowRssButtonInSectionTermList` | boolean | true \| false | To show RSS icon in Section, Term and List pages |
| `UseHugoToc` | boolean | true \| false | To use Hugo's default Toc instead of custom | | `UseHugoToc` | boolean | true \| false | To use Hugo's default Toc instead of custom |
@@ -128,6 +128,7 @@ fuseOpts:
distance: 1000 distance: 1000
threshold: 0.4 threshold: 0.4
minMatchCharLength: 0 minMatchCharLength: 0
limit: 10 # refer: https://www.fusejs.io/api/methods.html#search
keys: ["title", "permalink", "summary", "content"] ## can be less but not more than shown in list keys: ["title", "permalink", "summary", "content"] ## can be less but not more than shown in list
``` ```
@@ -136,10 +137,8 @@ fuseOpts:
```yml ```yml
socialIcons: socialIcons:
- name: "<platform>" - name: "<platform>"
title: "<custom title>"
url: "<link>" url: "<link>"
- name: "<platform 2>" - name: "<platform 2>"
title: "<custom title 2>"
url: "<link2>" url: "<link2>"
``` ```
@@ -185,7 +184,7 @@ editPost:
| `cover.responsiveImages` | boolean | true \| false | To enable/disable generation of responsive cover images | | `cover.responsiveImages` | boolean | true \| false | To enable/disable generation of responsive cover images |
| `cover.hidden` | boolean | true \| false | To hide on current single page | | `cover.hidden` | boolean | true \| false | To hide on current single page |
| `weight ` | integer | 5 | To set page order or to pin a post to Top of list | | `weight ` | integer | 5 | To set page order or to pin a post to Top of list |
| `ShareButtons` | list | ["linkedin", "twitter"] | To customize which share buttons to be enabled on page | | `ShareButtons` | list | ["linkedin", "x"] | To customize which share buttons to be enabled on page |
| `ShowWordCount` | boolean | true \| false | To word count to metadata | | `ShowWordCount` | boolean | true \| false | To word count to metadata |
| `ShowRssButtonInSectionTermList` | boolean | true \| false | To show RSS icon in Section, Term and List pages | | `ShowRssButtonInSectionTermList` | boolean | true \| false | To show RSS icon in Section, Term and List pages |
| `UseHugoToc` | boolean | true \| false | To use Hugo's default Toc instead of custom | | `UseHugoToc` | boolean | true \| false | To use Hugo's default Toc instead of custom |