mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
update demo
This commit is contained in:
parent
11c4de59cb
commit
7223b0f313
@ -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
|
||||||
---
|
---
|
||||||
|
@ -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:
|
||||||
|
@ -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.
|
|
||||||
|
@ -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>
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -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 |
|
||||||
| | | | |
|
| | | | |
|
||||||
|
| fuseOpts | - | - | [Details](#fuseOpts) |
|
||||||
|
| socialIcons | - | - | [Details](#socialIcons) |
|
||||||
|
| label | - | - | [Details](#label) |
|
||||||
|
| assets | - | - | [Details](#assets) |
|
||||||
|
| cover | - | - | [Details](#cover) |
|
||||||
|
| profileMode | - | - | [Details](#profilemode) |
|
||||||
|
|
||||||
|
#### label
|
||||||
|
|
||||||
|
| name | type | example | Description |
|
||||||
|
| ---------------- | ------- | ----------------------- | ------------------------------------------------ |
|
||||||
| label.text | string | 'Home' | To display different label text other than title |
|
| label.text | string | 'Home' | To display different label text other than title |
|
||||||
| label.icon | string | '/apple-touch-icon.png' | To display a logo image in label |
|
| label.icon | string | '/apple-touch-icon.png' | To display a logo image in label |
|
||||||
| label.iconHeight | integer | 35 | To set size of label logo image |
|
| label.iconHeight | integer | 35 | To set size of label logo image |
|
||||||
|
|
||||||
|
#### profileMode
|
||||||
|
|
||||||
|
| 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.favicon | string | 'icon.ico' | To set favicon, can be path or external link |
|
||||||
| assets.disableHLJS | | | |
|
| assets.disableHLJS | boolean | | |
|
||||||
| assets.disableFingerprinting | | | |
|
| assets.disableFingerprinting | boolean | | |
|
||||||
|
|
||||||
|
#### cover
|
||||||
|
|
||||||
|
| name | type | example | Description |
|
||||||
|
| ---------------------- | ------- | ------------- | ------------------------------------------------------- |
|
||||||
| cover.linkFullImages | boolean | true \| false | To open full size cover images on click on cover |
|
| 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.responsiveImages | boolean | true \| false | To enable/disable generation of responsive cover images |
|
||||||
| cover.hidden | | | |
|
| cover.hidden | boolean | true \| fals | |
|
||||||
| cover.hiddenInList | | | |
|
| cover.hiddenInList | boolean | true \| fals | |
|
||||||
| cover.hiddenInSingle | | | |
|
| cover.hiddenInSingle | boolean | true \| fals | |
|
||||||
| profileMode.enabled | | | |
|
|
||||||
| profileMode.title | | | |
|
#### fuseOpts
|
||||||
| profileMode.imageUrl | | | |
|
|
||||||
| profileMode.imageWidth | | | |
|
```yml
|
||||||
| profileMode.imageHeight | | | |
|
fuseOpts:
|
||||||
| profileMode.imageTitle | | | |
|
isCaseSensitive: false
|
||||||
| profileMode.buttons | | | |
|
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 | |
|
||||||
|
| searchHidden | boolean | true \| false | |
|
||||||
|
| ShowBreadCrumbs | boolean | true \| false | Show BreadCrumb Navigation above single post/page |
|
||||||
| author | string \|list | 'Me' \| ['Me','You'] | To show multiple Authors |
|
| author | string \|list | 'Me' \| ['Me','You'] | To show multiple Authors |
|
||||||
| cover.image | string | 'featured.jpg' | To add a cover image |
|
| cover.image | string | 'featured.jpg' | To add a cover image |
|
||||||
| cover.caption | string | 'caption for image' | To add caption to cover image |
|
| cover.caption | string | 'caption for image' | To add caption to cover image |
|
||||||
| cover.alt | string | 'this is cover image' | Alternate text to show if image doesn't load/show up |
|
| 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 |
|
| cover.relative | boolean | true \| false | To use relative path for cover image, used in hugo Page-bundles |
|
||||||
| cover.hidden | | | |
|
| cover.hidden | boolean | true \| false | |
|
||||||
| | | | |
|
| | | | |
|
||||||
| 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 |
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user