From 13213fdb3a967108350d77318a1dbd2456857e8e Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 13 Jan 2021 20:32:37 +0530 Subject: [PATCH] =?UTF-8?q?revamp=20=F0=9F=8C=9F=20[WIP]=20prepare=20for?= =?UTF-8?q?=204.0=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.yml | 72 +++++++--- content/posts/markdown-syntax.md | 4 +- content/posts/papermod/papermod-faq.md | 29 +++- .../posts/papermod/papermod-features/index.md | 42 ++++-- content/posts/papermod/papermod-icons.md | 3 +- .../posts/papermod/papermod-installation.md | 136 ++++++++++++------ content/posts/papermod/papermod-variables.md | 2 +- 7 files changed, 205 insertions(+), 83 deletions(-) diff --git a/config.yml b/config.yml index b3050acf..abd71569 100644 --- a/config.yml +++ b/config.yml @@ -1,9 +1,13 @@ baseURL: "https://adityatelange.github.io/hugo-PaperMod/" title: PaperMod -paginate: 8 +paginate: 5 theme: hugo-PaperMod + enableInlineShortcodes: true enableRobotsTXT: true +buildDrafts: false +buildFuture: false +buildExpired: false # googleAnalytics: UA-123-45 @@ -26,9 +30,12 @@ languages: - name: Tags url: tags/ weight: 10 + - name: Categories + url: categories/ + weight: 10 fr: - languageName: "Lang2" + languageName: ":fr:" weight: 2 title: PaperModL2 profileMode: @@ -66,7 +73,6 @@ languages: url: "#" fa: - languageName: "Langrtl" languagedirection: rtl weight: 3 title: PaperMod RTL @@ -86,17 +92,19 @@ outputs: - JSON params: - env: production + env: production # to enable google analytics, opengraph, twitter-cards and schema. description: "Theme PaperMod - https://github.com/adityatelange/hugo-PaperMod" author: Theme PaperMod # author: ["Me", "You"] # multiple authors - ShowReadingTime: true + defaultTheme: auto + # disableThemeToggle: true ShowShareButtons: true + ShowReadingTime: true + # disableSpecial1stPost: true displayFullLangName: true - # images: "" - # assets: - # favicon: '' + # comments: false + # images: [""] profileMode: enabled: false @@ -112,23 +120,53 @@ params: url: tags homeInfoParams: - Title: "Hi there \U0001F44B" + Title: "PaperMod v3.0" Content: > Welcome to demo of hugo's theme PaperMod. - **PaperMod** is a simple but fast and responsive theme with useful feature-set that enhances UX. + - Do give a 🌟 on Github ! + + - PaperMod is based on theme [Paper](https://github.com/nanxiaobei/hugo-paper). + socialIcons: - - name: twitter - url: "#" - - name: stackoverflow - url: "#" - - name: codepen - url: "#" - - name: linkedin - url: "#" - name: github url: "https://github.com/adityatelange/hugo-PaperMod" + - name: KoFi + url: "https://ko-fi.com/adityatelange" + - name: RsS + url: "index.xml" + + # label: + # text: "Home" + # icon: icon.png + # iconHeight: 35 + + # analytics: + # google: + # SiteVerificationTag: "XYZabc" + + # assets: + # favicon: "" + # favicon16x16: "" + # favicon32x32: "" + # apple_touch_icon: "" + # safari_pinned_tab: "" + + # cover: + # hidden: true # hide everywhere but not in structured data + # hiddenInList: true # hide on list pages and home + # hiddenInSingle: true # hide on single page + + # fuseOpts: + # isCaseSensitive: false + # shouldSort: true + # location: 0 + # distance: 1000 + # threshold: 0.4 + # minMatchCharLength: 0 + # keys: ["title", "permalink", "summary", "content"] taxonomies: category: categories diff --git a/content/posts/markdown-syntax.md b/content/posts/markdown-syntax.md index d6ab88c1..25af33e5 100644 --- a/content/posts/markdown-syntax.md +++ b/content/posts/markdown-syntax.md @@ -9,7 +9,6 @@ series: ["Themes Guide"] aliases: ["migrate-from-jekyl"] ShowToc: true TocOpen: true -weight: 2 --- This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. @@ -49,7 +48,8 @@ The blockquote element represents content that is quoted from another source, op #### Blockquote with attribution -> Don't communicate by sharing memory, share memory by communicating.
+> Don't communicate by sharing memory, share memory by communicating. +> > — Rob Pike[^1] [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. diff --git a/content/posts/papermod/papermod-faq.md b/content/posts/papermod/papermod-faq.md index c9139456..de5953c1 100644 --- a/content/posts/papermod/papermod-faq.md +++ b/content/posts/papermod/papermod-faq.md @@ -1,6 +1,6 @@ --- -title: "Papermod - How To's Guide" -summary: FAQs +title: "FAQs" +summary: Frequently Asked Questions date: 2020-09-18T11:30:03+05:30 showtoc: true tocOpen: true @@ -9,6 +9,7 @@ tags: ["PaperMod"] author: "Aditya Telange" draft: true aliases: [/posts/papermod/papermod-how-to] +weight: 3 --- ## Intro @@ -106,7 +107,7 @@ summary: archives ## Bundling Custom css with theme's assets -- For adding custom css to be bundled inside one minimized css +- For adding custom css to be bundled inside one minimized css Create folder in yout project directory as @@ -126,10 +127,10 @@ All `css` files inside `assets/css/extended` will be bundled ! **Note**: blank.css is just the placeholder so that it doesn't break the theme when no files are present under `assets/css/extended` - Linked Issues: -- [Papermod Theme: How to add custom CSS?](https://discourse.gohugo.io/t/papermod-theme-how-to-add-custom-css/30165) +- [Papermod Theme: How to add custom CSS?](https://discourse.gohugo.io/t/papermod-theme-how-to-add-custom-css/30165) + --- ## Custom Head / Footer @@ -162,6 +163,7 @@ and contents of `extend_footer.html` will be added to bottom of page. 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`: + ```yml menu: main: @@ -178,8 +180,9 @@ menu: url: https://example.org weight: 30 ``` -`name` controls what will be displayed for the menu entry. -`url` sets the URL that the entry points to. + +`name` controls what will be displayed for the menu entry. +`url` sets the URL that the entry points to. `weight` is used to control the positioning of entries. For more information on menus, see the [Hugo wiki page](https://gohugo.io/content-management/menus/). @@ -258,6 +261,18 @@ and can be added accordingly. --- +## Centering image in markdown + +Add `#center` after image to center align an image + +```md +![name](path/to/image.png#center) +``` + +Thanks to [@pacientes](https://github.com/pacientes) for this + +--- + ## References - [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/) diff --git a/content/posts/papermod/papermod-features/index.md b/content/posts/papermod/papermod-features/index.md index f32ba0ec..3ae62a34 100644 --- a/content/posts/papermod/papermod-features/index.md +++ b/content/posts/papermod/papermod-features/index.md @@ -1,5 +1,5 @@ --- -title: "Papermod - Features" +title: "Features" summary: Get known about All Features in PaperMod date: 2020-09-16T11:30:03+05:30 showToc: true @@ -309,6 +309,36 @@ read more about this [here](https://gohugo.io/content-management/comments/) --- +### AccessKeys + +```text +c - ToC Open/Close +g - Go To Top +h - Home (according to current lang) +t - Theme toggle +/ - Jumps to search page if in menu +``` + +[What's AccessKeys ?](https://www.w3schools.com/tags/att_global_accesskey.asp) + +--- + +### Enhanced SEO + +**Enabled only when `env: prod`** + +- [Rich Results/Snippets Support](https://support.google.com/webmasters/answer/7506797?hl=en) + +- Twitter Cards Support + +- Open-Graph support + +--- + +### Multilingual Support + +--- + ### Misc #### Scroll-Bar themed (by default) @@ -317,18 +347,12 @@ read more about this [here](https://gohugo.io/content-management/comments/) #### Scroll-to-Top Button (by default) +```text Displays a Scroll-to-Top button in right-bottom corner +``` #### Google Analytics integration -#### Open-Graph support - -#### Twitter Cards Support - #### Syntax highlighting -#### Twitter cards and opengraph tags support - #### RSS feeds - -#### Multilingual Support diff --git a/content/posts/papermod/papermod-icons.md b/content/posts/papermod/papermod-icons.md index e38e7b53..7ed44b53 100644 --- a/content/posts/papermod/papermod-icons.md +++ b/content/posts/papermod/papermod-icons.md @@ -1,5 +1,5 @@ --- -title: "Papermod - Icons" +title: "Icons" summary: List of all Icons supported by PaperMod date: 2020-09-17T11:30:03+05:30 showtoc: true @@ -8,6 +8,7 @@ weight: 3 aliases: ["/papermod-icons"] tags: ["PaperMod"] author: "Aditya Telange" +draft: true --- ## Social Icons diff --git a/content/posts/papermod/papermod-installation.md b/content/posts/papermod/papermod-installation.md index 5051a8fe..4327c0fe 100644 --- a/content/posts/papermod/papermod-installation.md +++ b/content/posts/papermod/papermod-installation.md @@ -1,5 +1,5 @@ --- -title: "Papermod - Installation" +title: "Installation | Update" summary: Read Install and Update instructions here date: 2020-09-15T11:30:03+05:30 series: ["PaperMod"] @@ -13,48 +13,76 @@ TocOpen: true ## Guide -Follow [this](https://gohugo.io/getting-started/quick-start/) guide to setup hugo and create a new site. -Make sure you install latest version of `hugo`(>=0.74.0). +Follow [Quick Start](https://gohugo.io/getting-started/quick-start/) guide to setup hugo and create a new site. +Make sure you install latest version of **`hugo(>=0.74.0)`**. 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: +### Method 1 + Inside the folder of your Hugo site, run: -> ```console -> git clone https://github.com/adityatelange/hugo-PaperMod themes/hugo-PaperMod --depth=1 -> ``` -> -> > Updating theme : -> > -> > ```console -> > cd themes/hugo-PaperMod -> > git pull -> > ``` - -**or** you can use as [submodule](https://www.atlassian.com/git/tutorials/git-submodule) with - -> ```console -> git submodule add https://github.com/adityatelange/hugo-PaperMod.git themes/hugo-PaperMod -> git submodule update --init --recursive -> ``` -> -> > Updating theme with submodule : -> > -> > ```console -> > git submodule update --remote --merge -> > ``` -> > -> > Then change in `config.yml`: - -```yml -theme: "hugo-PaperMod" +```bash +git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1 ``` -Example Site Structure is present here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite/) +**Note**: You may use ` --branch v3.0` to end of above command if you want to stick to specific release. + +> Updating theme : +> +> ```bash +> cd themes/PaperMod +> git pull +> ``` + +### Method 2 + +you can use as [submodule](https://www.atlassian.com/git/tutorials/git-submodule) with + +```bash +git submodule add https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod --depth=1 +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. + +> Updating theme : +> +> ```bash +> git submodule update --remote --merge +> ``` + +### Method 3 + +Or you can Download as Zip from Github Page and extract in your themes directory + +### Finally ... + +Add in `config.yml`: + +```yml +theme: "PaperMod" +``` --- -### Sample `config.yml` +## Quick Links + +- ### [Papermod - Features](../papermod-features) + +- ### [Papermod - How to Guide](../papermod-how-to) + +- ### [Papermod - Icons](../papermod-icons) + +- ### [ChangeLog](https://github.com/adityatelange/hugo-PaperMod/releases) + +--- + +## Sample `config.yml` + +> **Example Site Structure is present here**: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite/) + +**Use appropriately** ```yml baseURL: "https://examplesite.com" @@ -90,6 +118,8 @@ params: disableSpecial1stPost: false assets: + # disableHLJS: true # to disable highlightjs + # disableFingerprinting: true favicon: "" favicon16x16: "" favicon32x32: "" @@ -105,8 +135,10 @@ params: profileMode: enabled: false # needs to be explicitly set title: ExampleSite - # imageUrl: '' - # imageTitle: my image + imageUrl: "" + imageWidth: 120 + imageHeight: 120 + imageTitle: my image buttons: - name: Posts url: posts @@ -130,6 +162,21 @@ params: google: SiteVerificationTag: "XYZabc" + cover: + hidden: true # hide everywhere but not in structured data + hiddenInList: true # hide on list pages and home + hiddenInSingle: true # hide on single page + + # for search + # https://fusejs.io/api/options.html + fuseOpts: + isCaseSensitive: false + shouldSort: true + location: 0 + distance: 1000 + threshold: 0.4 + minMatchCharLength: 0 + keys: ["title", "permalink", "summary", "content"] menu: main: - identifier: categories @@ -148,7 +195,7 @@ menu: --- -### Sample `Page.md` +## Sample `Page.md` ```yml --- @@ -165,19 +212,16 @@ draft: false hidemeta: false disableShare: false cover: - image: "" - alt: "" - caption: "" - relative: false + image: "" # image path/url + alt: "" # alt text + caption: "" # display caption under cover + relative: false # when using page bundles set this to true + hidden: true # only hide on current single page comments: false +description: "Desc Text." +disableHLJS: true # to disable highlightjs --- ``` --- - -### [Papermod - Features](../papermod-features) - -### [Papermod - How to Guide](../papermod-how-to) - -### [Papermod - Icons](../papermod-icons) diff --git a/content/posts/papermod/papermod-variables.md b/content/posts/papermod/papermod-variables.md index 85f9e9bc..fa6cdf8e 100644 --- a/content/posts/papermod/papermod-variables.md +++ b/content/posts/papermod/papermod-variables.md @@ -1,5 +1,5 @@ --- -title: "Papermod - Variables" +title: "Variables | Front Matter" summary: List of Front Matter variables used by PaperMod date: 2020-09-24T11:33:33+05:30 showToc: true