update demo

This commit is contained in:
Aditya Telange 2021-02-01 11:17:12 +05:30
parent 11c4de59cb
commit 7223b0f313
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
6 changed files with 187 additions and 51 deletions

View File

@ -1,5 +1,5 @@
--- ---
title: Sub-Section PaperMod title: PaperMod
summary: Contains posts related to `PaperMod` summary: Contains posts related to `PaperMod`
description: Contains posts related to PaperMod description: Contains posts related to PaperMod
--- ---

View File

@ -10,6 +10,14 @@ author: "Aditya Telange"
tocopen: true tocopen: 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.
---
### Assets (js/css) ### Assets (js/css)
The following is enabled by default The following is enabled by default
@ -60,12 +68,25 @@ You can refer following table for better understanding...
Create a page with `archive.md` in `content` directory with following content Create a page with `archive.md` in `content` directory with following content
```shell
.
├── config.yml
├── content/
│ ├── archives.md <--- Create archive.md here
│ └── posts/
├── static/
└── themes/
└── PaperMod/
```
and add the following to it
```yml ```yml
--- ---
title: "Archive" # in any language you want title: "Archive"
layout: "archives" # is necessary layout: "archives"
url: "/archive" url: "/archives/"
summary: "archive" summary: archives
--- ---
``` ```
@ -109,7 +130,7 @@ ex. [config.yml#L106](https://github.com/adityatelange/hugo-PaperMod/blob/exampl
### Profile Mode ### Profile Mode
![profile](images/profile.jpg) ![profile](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/posts/papermod/papermod-features/images/profile.jpg)
Shows Index/Home page as Full Page with Social Links and Image Shows Index/Home page as Full Page with Social Links and Image
@ -141,6 +162,8 @@ params:
### Search ### Search
PaperMod uses [Fuse.js Basic](https://fusejs.io/getting-started/different-builds.html#explanation-of-different-builds) for seach functionality
Add the following to site config, `config.yml` Add the following to site config, `config.yml`
```yml ```yml
@ -158,11 +181,21 @@ Create a page with `search.md` in `content` directory with following content
title: "Search" # in any language you want title: "Search" # in any language you want
layout: "search" # is necessary layout: "search" # is necessary
# url: "/archive" # url: "/archive"
# description: "Description for Search"
summary: "search" summary: "search"
--- ---
``` ```
To hide a particular page from being searched, add it in post's fron't matter
```yml
---
searchHidden: true
```
ex: [search.md](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/search.md)
For Multilingual use `search.<lang>.md` ex. `search.es.md`. For Multilingual use `search.<lang>.md` ex. `search.es.md`.
**Note:** Search will work only on current language, user is currently on ! **Note:** Search will work only on current language, user is currently on !
@ -183,8 +216,6 @@ params:
keys: ["title", "permalink", "summary", "content"] keys: ["title", "permalink", "summary", "content"]
``` ```
ex: [search.md](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/search.md)
--- ---
### Draft Page indication ### Draft Page indication
@ -271,6 +302,33 @@ TocOpen: true
--- ---
### BreadCrumb Navigation
Adds BreadCrumb Navigation above Post's Title to show subsections and Navigation to Home
```yml
params:
ShowBreadCrumbs: true
```
Can be diabled for particular page's front-matter
```yml
---
ShowBreadCrumbs: false
---
```
### Other Posts suggestion below a post
Adds a Previous / Next post suggestion under a single post
```yml
params:
ShowPostNavLinks: true
```
### Multiple Authors ### Multiple Authors
To Use multiple authors for a post, in post-variables: To Use multiple authors for a post, in post-variables:

View File

@ -13,7 +13,7 @@ draft: true
## Social Icons ## Social Icons
| No. | name | platform link | | No. | Name | Platform Link |
| --- | ------------- | ------------------------------- | | --- | ------------- | ------------------------------- |
| 1 | 123rf | 123rf.com | | 1 | 123rf | 123rf.com |
| 2 | adobestock | stock.adobe.com | | 2 | adobestock | stock.adobe.com |
@ -89,5 +89,3 @@ Usage:
params: params:
ShowShareButtons: true ShowShareButtons: true
``` ```
You can see Below how share Icons Look.

View File

@ -44,7 +44,7 @@ git submodule add https://github.com/adityatelange/hugo-PaperMod.git themes/Pape
git submodule update --init --recursive git submodule update --init --recursive
``` ```
**Note**: You may use ` --branch v3.0` to end of above command if you want to stick to specific release. **Note**: You may use ` --branch v4.0` to end of above command if you want to stick to specific release.
> Updating theme : > Updating theme :
> >
@ -56,6 +56,14 @@ git submodule update --init --recursive
Or you can Download as Zip from Github Page and extract in your themes directory Or you can Download as Zip from Github Page and extract in your themes directory
Direct Links:
- [Master Branch (Latest)](https://github.com/adityatelange/hugo-PaperMod/archive/master.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)
### Finally ... ### Finally ...
Add in `config.yml`: Add in `config.yml`:
@ -197,13 +205,13 @@ menu:
url: https://example.org url: https://example.org
weight: 30 weight: 30
# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma # Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma
# pygmentsUseClasses: true
# markup: # markup:
# highlight: # highlight:
# # anchorLineNos: true # # anchorLineNos: true
# codeFences: true # codeFences: true
# guessSyntax: true # guessSyntax: true
# lineNos: true # lineNos: true
# # noClasses: false
# style: monokai # style: monokai
``` ```
@ -229,6 +237,7 @@ description: "Desc Text."
disableHLJS: true # to disable highlightjs disableHLJS: true # to disable highlightjs
disableShare: false disableShare: false
disableHLJS: false disableHLJS: false
searchHidden: true
cover: cover:
image: "<image path/url>" # image path/url image: "<image path/url>" # image path/url
alt: "<alt text>" # alt text alt: "<alt text>" # alt text
@ -239,4 +248,10 @@ cover:
--- ---
``` ```
You can use it by creating `archetypes/post.md`
```shell
hugo new --kind post <name>
```
--- ---

View File

@ -31,48 +31,112 @@ weight: 5
| hidemeta | boolean | true \| false | To Hide meta elements : date, read-time, author and available-translations for page | | hidemeta | boolean | true \| false | To Hide meta elements : date, read-time, author and available-translations for page |
| showtoc | boolean | true \| false | To show/hide Table of Contents | | showtoc | boolean | true \| false | To show/hide Table of Contents |
| 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 |
| ShowBreadCrumbs | boolean | true \| false | Show BreadCrumb Navigation above single post/page |
| comments | boolean | true \| false | To show/hide comments | | comments | boolean | true \| false | To show/hide comments |
| fuseOpts | | | | | analytics.google.SiteVerificationTag | string | "XYZabc" | Site Verification Tag for Google Analytics |
| socialIcons | | | | | analytics.bing.SiteVerificationTag | string | "XYZabc" | Site Verification Tag for Bing |
| analytics.google.SiteVerificationTag | string | "XYZabc" | | | analytics.yandex.SiteVerificationTag | string | "XYZabc" | Site Verification Tag for Yandex |
| | | | | | | | | |
| label.text | string | 'Home' | To display different label text other than title | | fuseOpts | - | - | [Details](#fuseOpts) |
| label.icon | string | '/apple-touch-icon.png' | To display a logo image in label | | socialIcons | - | - | [Details](#socialIcons) |
| label.iconHeight | integer | 35 | To set size of label logo image | | label | - | - | [Details](#label) |
| assets.favicon | string | 'icon.ico' | To set favicon, can be path or external link | | assets | - | - | [Details](#assets) |
| assets.disableHLJS | | | | | cover | - | - | [Details](#cover) |
| assets.disableFingerprinting | | | | | profileMode | - | - | [Details](#profilemode) |
| cover.linkFullImages | boolean | true \| false | To open full size cover images on click on cover |
| cover.responsiveImages | boolean | true \| false | To enable/disable generation of responsive cover images | #### label
| cover.hidden | | | |
| cover.hiddenInList | | | | | name | type | example | Description |
| cover.hiddenInSingle | | | | | ---------------- | ------- | ----------------------- | ------------------------------------------------ |
| profileMode.enabled | | | | | label.text | string | 'Home' | To display different label text other than title |
| profileMode.title | | | | | label.icon | string | '/apple-touch-icon.png' | To display a logo image in label |
| profileMode.imageUrl | | | | | label.iconHeight | integer | 35 | To set size of label logo image |
| profileMode.imageWidth | | | |
| profileMode.imageHeight | | | | #### profileMode
| profileMode.imageTitle | | | |
| profileMode.buttons | | | | | name | type | example | Description |
| ----------------------- | ------- | ---------------------------------------------- | ----------- |
| profileMode.enabled | boolean | true \| false | |
| profileMode.title | string | "Title" | |
| profileMode.imageUrl | string | "image.png" \| "https://example.com/image.jpg" | |
| profileMode.imageWidth | string | "" | |
| profileMode.imageHeight | string | "" | |
| profileMode.imageTitle | string | "This image is a picture of .." | |
| profileMode.buttons | - | - | |
#### assets
| name | type | example | Description |
| ---------------------------- | ------- | ---------- | -------------------------------------------- |
| assets.favicon | string | 'icon.ico' | To set favicon, can be path or external link |
| assets.disableHLJS | boolean | | |
| assets.disableFingerprinting | boolean | | |
#### cover
| name | type | example | Description |
| ---------------------- | ------- | ------------- | ------------------------------------------------------- |
| cover.linkFullImages | boolean | true \| false | To open full size cover images on click on cover |
| cover.responsiveImages | boolean | true \| false | To enable/disable generation of responsive cover images |
| cover.hidden | boolean | true \| fals | |
| cover.hiddenInList | boolean | true \| fals | |
| cover.hiddenInSingle | boolean | true \| fals | |
#### fuseOpts
```yml
fuseOpts:
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 0.4
minMatchCharLength: 0
keys: ["title", "permalink", "summary", "content"] ## can be less but not more than shown in list
```
#### socialIcons
```yml
socialIcons:
- name: "<platform>"
url: "<link>"
- name: "<platform 2>"
url: "<link2>"
```
####
```yml
profileMode:
buttons:
- name: Archive
url: "/archive"
- name: Github
url: "https://github.com/"
```
--- ---
### Page Variables ### Page Variables
| Name | Type | Example | Description | | Name | Type | Example | Description |
| -------------- | ------------- | --------------------- | ----------------------------------------------------------------------------------- | | --------------- | ------------- | --------------------- | ----------------------------------------------------------------------------------- |
| showtoc | boolean | true \| false | To show/hide Table of Contents | | showtoc | boolean | true \| false | To show/hide Table of Contents |
| 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 |
| hidemeta | boolean | true \| false | To Hide meta elements : date, read-time, author and available-translations for page | | hidemeta | boolean | true \| false | To Hide meta elements : date, read-time, author and available-translations for page |
| comments | boolean | true \| false | To show/hide comments | | comments | boolean | true \| false | To show/hide comments |
| description | string | 'description text' | Show Post Description under Title | | description | string | 'description text' | Show Post Description under Title |
| disableShare | boolean | true \| false | To hide/show share icons under a page | | disableShare | boolean | true \| false | To hide/show share icons under a page |
| disableHLJS | | | | | disableHLJS | boolean | true \| false | |
| author | string \|list | 'Me' \| ['Me','You'] | To show multiple Authors | | searchHidden | boolean | true \| false | |
| cover.image | string | 'featured.jpg' | To add a cover image | | ShowBreadCrumbs | boolean | true \| false | Show BreadCrumb Navigation above single post/page |
| cover.caption | string | 'caption for image' | To add caption to cover image | | author | string \|list | 'Me' \| ['Me','You'] | To show multiple Authors |
| cover.alt | string | 'this is cover image' | Alternate text to show if image doesn't load/show up | | cover.image | string | 'featured.jpg' | To add a cover image |
| cover.relative | boolean | true \| false | To use relative path for cover image, used in hugo Page-bundles | | cover.caption | string | 'caption for image' | To add caption to cover image |
| cover.hidden | | | | | cover.alt | string | 'this is cover image' | Alternate text to show if image doesn't load/show up |
| | | | | | cover.relative | boolean | true \| false | To use relative path for cover image, used in hugo Page-bundles |
| weight | integer | 5 | To set page order or to pin a post to Top of list | | cover.hidden | boolean | true \| false | |
| | | | |
| weight | integer | 5 | To set page order or to pin a post to Top of list |

View File

@ -5,6 +5,7 @@ date: "2019-03-09"
description: "Lorem Ipsum Dolor Si Amet" description: "Lorem Ipsum Dolor Si Amet"
tags: ["markdown", "text"] tags: ["markdown", "text"]
hideMeta: true hideMeta: true
searchHidden: true
--- ---
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.