From ccaca9896cc360c3412087d10c34394d3063d3d6 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 6 Oct 2020 13:01:20 +0530 Subject: [PATCH] 2.0 docs --- config.yml | 10 -- content/posts/papermod/papermod-features.md | 100 ++++++++++-------- .../posts/papermod/papermod-installation.md | 98 ++++++++++++++++- 3 files changed, 152 insertions(+), 56 deletions(-) diff --git a/config.yml b/config.yml index 08b10c21..80050704 100644 --- a/config.yml +++ b/config.yml @@ -1,16 +1,12 @@ baseURL: 'https://adityatelange.github.io/hugo-PaperMod/' title: PaperMod paginate: 5 -languageCode: en -DefaultContentLanguage: en -enableInlineShortcodes: true theme: hugo-PaperMod params: description: 'Theme PaperMod - https://github.com/adityatelange/hugo-PaperMod' author: Theme PaperMod ShowReadingTime: true - contentTypeName: posts defaultTheme: auto ShowShareButtons: true profileMode: @@ -40,12 +36,6 @@ params: - name: github url: 'https://github.com/adityatelange/hugo-PaperMod' -markup: - tableOfContents: - endLevel: 3 - ordered: false - startLevel: 1 - menu: main: - name: Archives diff --git a/content/posts/papermod/papermod-features.md b/content/posts/papermod/papermod-features.md index f2c0a065..df3590b2 100644 --- a/content/posts/papermod/papermod-features.md +++ b/content/posts/papermod/papermod-features.md @@ -9,7 +9,7 @@ author: "Aditya Telange" tocopen: true --- -## Assets (js/css) +### Assets (js/css) The following is enabled by default - [minification](https://gohugo.io/hugo-pipes/minification/) - makes the assets size smallest as possible. - [bundling](https://gohugo.io/hugo-pipes/bundling/) - bundles all the styles in one single asset @@ -17,44 +17,43 @@ The following is enabled by default --- -## Default Theme light/dark - -```yml -params: - defaultTheme: light -``` - -or - -```yml -params: - defaultTheme: dark -``` - -or +### Default Theme light/dark/auto ```yml params: + # defaultTheme: light + # defaultTheme: dark defaultTheme: auto # to switch between dark or light according to browser theme ``` --- -## Archives Layout +### Theme Switch Toggle (enabled by default) -Add vars below to page-variables +Shows icon besides title of page to change theme + +To disable it : + +```yml +disableThemeToggle : true +``` + +--- + +### Archives Layout + +Create a page with `archive.md` +Add vars below to its page-variables ```yml layout: "archives" ``` -ex: [here](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/archives.md) - -![](https://i.ibb.co/cNWc7GZ/paper-mod-archives.png) +ex: [archives.md](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/exampleSite/content/archives.md) --- -## Home-Info Mode +### Home-Info Mode Use 1st entry as some Information @@ -78,7 +77,7 @@ ex. [here](https://github.com/adityatelange/hugo-PaperMod/blob/exampleSite/confi --- -## Profile Mode +### Profile Mode Shows Index/Home page as Full Page with Social Links and Image @@ -108,33 +107,28 @@ params: --- -## [Draft](https://gohugo.io/getting-started/usage/#draft-future-and-expired-content) Page indication +### Draft Page indication adds `[draft]` mark to indicate draft pages. --- -## Cover for a Post +### Post Cover Image In post's page-variables add : ```yml -cover = "" -# can also paste direct link from external site -# ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png +cover: + image: '' + # can also paste direct link from external site + # ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png + alt: '' + caption: '' ``` -![](https://user-images.githubusercontent.com/21258296/93084795-3579ae80-f6b2-11ea-98c1-eee4061eb836.png) - --- -## Scroll-to-Top Button (by default) - -Displays a Scroll-to-Top button in right-bottom corner - ---- - -## Share Buttons on post +### Share Buttons on post Displays Share Buttons at Bottom of each post @@ -144,11 +138,9 @@ params: ShowShareButtons: true ``` -![](https://i.ibb.co/sPN8bgd/paper-mod-share-butons.png) - --- -## Show post reading time +### Show post reading time Displays Reading Time (the estimated time, in minutes, it takes to read the content.) @@ -160,7 +152,7 @@ Params: --- -## Show Table of Contents (Toc) on blog post +### Show Table of Contents (Toc) on blog post Displays ToC on blog-pages @@ -176,7 +168,7 @@ TocOpen: true --- -## Comments +### Comments to add comments, create a html file @@ -195,8 +187,26 @@ read more about this [here](https://gohugo.io/content-management/comments/) --- -## Scroll-Bar themed (by default) +### Misc ---- +#### Scroll-Bar themed (by default) -## Smooth Scroll between in-page links (by default) +#### Smooth Scroll between in-page links (by default) + +#### Scroll-to-Top Button (by default) + +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 \ No newline at end of file diff --git a/content/posts/papermod/papermod-installation.md b/content/posts/papermod/papermod-installation.md index 950560a3..44425797 100644 --- a/content/posts/papermod/papermod-installation.md +++ b/content/posts/papermod/papermod-installation.md @@ -6,8 +6,12 @@ weight: 1 aliases: ['/papermod-installation'] tags: ['PaperMod'] author: "Aditya Telange" +showToc: true +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.57.1). @@ -35,7 +39,7 @@ Inside the folder of your Hugo site, run: > > git submodule update --remote --merge > > ``` > > -Then change in `config.toml`: +Then change in `config.yml`: > ```yml theme: "hugo-PaperMod" @@ -45,6 +49,98 @@ Example Site Structure is present here: [exampleSite](https://github.com/adityat --- +### Sample `config.yml` + +```yml +baseURL: 'https://examplesite.com' +title: ExampleSite +paginate: 5 +theme: hugo-PaperMod + +enableRobotsTXT: true +buildDrafts: false +buildFuture: false +buildExpored: false + +googleAnalytics: UA-123-45 + +minify: + disableXML: true + minifyOutput: true + +params: + env: production # to enable google analytics, opengraph, twitter-cards and schema. + title: ExampleSite + description: 'ExampleSite's description' + author: Me + + images: "" + + ShowReadingTime: true + ShowShareButtons: true + comments: false + defaultTheme: auto + disableThemeToggle : false + disableSpecial1stPost : false + + # profile-mode + profileMode: + enabled: false # needs to be explicitly set + title: ExampleSite + # imageUrl: '' + # imageTitle: my image + buttons: + - name: Posts + url: posts + - name: Tags + url: tags + + # home-info mode + homeInfoParams: + Title: "Hi there \U0001F44B" + Content: Welcome to my blog + + socialIcons: + - name: twitter + url: 'https://twitter.com/' + - name: stackoverflow + url: 'https://stackoverflow.com' + - name: github + url: 'https://github.com/' + + + analytics: + google: + SiteVerificationTag: "XYZabc" +``` + +--- + +### Sample `Page.md` + +```yml +--- +title: "My 1st post" +date: 2020-09-15T11:30:03+00:00 +weight: 1 +aliases: ['/first'] +tags: ['first'] +author: "Me" +showToc: true +TocOpen: false +draft: false +hidemeta: false +disableShare: false +cover: + image: '' + alt: '' + caption: '' +comments: false +--- +``` + +--- + ### [Papermod - Features](../papermod-features) ### [Papermod - How to Guide](../papermod-how-to-guide) ### [Papermod - Icons](../papermod-icons) \ No newline at end of file