From fa4aec408639165416e5de373b61308bce6a6af8 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 27 Oct 2020 18:46:08 +0530 Subject: [PATCH] lint --- content/posts/emoji-support.md | 12 ++-- content/posts/markdown-syntax.l2.md | 58 +++++++++++-------- content/posts/markdown-syntax.l3.md | 58 +++++++++++-------- content/posts/markdown-syntax.md | 58 +++++++++++-------- content/posts/math-typesetting.md | 16 +++-- content/posts/papermod/_index.md | 2 +- content/posts/papermod/papermod-features.md | 43 +++++++++----- content/posts/papermod/papermod-how-to.md | 10 ++-- content/posts/papermod/papermod-icons.md | 7 ++- .../posts/papermod/papermod-installation.md | 36 +++++++----- content/posts/papermod/papermod-variables.md | 34 ++++++----- content/posts/placeholder-text.md | 4 +- content/posts/rich-content.md | 5 +- 13 files changed, 198 insertions(+), 145 deletions(-) diff --git a/content/posts/emoji-support.md b/content/posts/emoji-support.md index dc3589ad..ed94c92d 100644 --- a/content/posts/emoji-support.md +++ b/content/posts/emoji-support.md @@ -8,9 +8,11 @@ tags = [ ] +++ -Emoji can be enabled in a Hugo project in a number of ways. +Emoji can be enabled in a Hugo project in a number of ways. + -The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). + +The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. @@ -19,17 +21,18 @@ To enable emoji globally, set `enableEmoji` to `true` in your site's [configurat The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. -*** +--- **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. {{< highlight html >}} .emoji { - font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; +font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; } {{< /highlight >}} {{< css.inline >}} + + {{< /css.inline >}} diff --git a/content/posts/markdown-syntax.l2.md b/content/posts/markdown-syntax.l2.md index a106d831..af7079d9 100644 --- a/content/posts/markdown-syntax.l2.md +++ b/content/posts/markdown-syntax.l2.md @@ -21,6 +21,7 @@ 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. + ## Headings @@ -28,10 +29,15 @@ This article offers a sample of basic Markdown syntax that can be used in Hugo c The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. # H1 + ## H2 + ### H3 + #### H4 + ##### H5 + ###### H6 ## Paragraph @@ -47,7 +53,7 @@ The blockquote element represents content that is quoted from another source, op #### Blockquote without attribution > Tiam, ad mint andaepu dandae nostion secatur sequo quae. -> **Note** that you can use *Markdown syntax* within a blockquote. +> **Note** that you can use _Markdown syntax_ within a blockquote. #### Blockquote with attribution @@ -60,31 +66,31 @@ The blockquote element represents content that is quoted from another source, op Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. - Name | Age ---------|------ - Bob | 27 - Alice | 23 +| Name | Age | +| ----- | --- | +| Bob | 27 | +| Alice | 23 | #### Inline Markdown within tables | Italics | Bold | Code | -| -------- | -------- | ------ | -| *italics* | **bold** | `code` | +| --------- | -------- | ------ | +| _italics_ | **bold** | `code` | ## Code Blocks #### Code block with backticks ```html - + - - - Example HTML5 Document - - -

Test

- + + + Example HTML5 Document + + +

Test

+ ``` @@ -102,7 +108,9 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou #### Code block with Hugo's internal highlight shortcode + {{< highlight html >}} + @@ -125,19 +133,19 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou #### Unordered List -* List item -* Another item -* And another item +- List item +- Another item +- And another item #### Nested list -* Fruit - * Apple - * Orange - * Banana -* Dairy - * Milk - * Cheese +- Fruit + - Apple + - Orange + - Banana +- Dairy + - Milk + - Cheese ## Other Elements — abbr, sub, sup, kbd, mark diff --git a/content/posts/markdown-syntax.l3.md b/content/posts/markdown-syntax.l3.md index 507833a6..64755890 100644 --- a/content/posts/markdown-syntax.l3.md +++ b/content/posts/markdown-syntax.l3.md @@ -21,6 +21,7 @@ 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. + ## Headings @@ -28,10 +29,15 @@ This article offers a sample of basic Markdown syntax that can be used in Hugo c The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. # H1 + ## H2 + ### H3 + #### H4 + ##### H5 + ###### H6 ## Paragraph @@ -47,7 +53,7 @@ The blockquote element represents content that is quoted from another source, op #### Blockquote without attribution > Tiam, ad mint andaepu dandae nostion secatur sequo quae. -> **Note** that you can use *Markdown syntax* within a blockquote. +> **Note** that you can use _Markdown syntax_ within a blockquote. #### Blockquote with attribution @@ -60,31 +66,31 @@ The blockquote element represents content that is quoted from another source, op Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. - Name | Age ---------|------ - Bob | 27 - Alice | 23 +| Name | Age | +| ----- | --- | +| Bob | 27 | +| Alice | 23 | #### Inline Markdown within tables | Italics | Bold | Code | -| -------- | -------- | ------ | -| *italics* | **bold** | `code` | +| --------- | -------- | ------ | +| _italics_ | **bold** | `code` | ## Code Blocks #### Code block with backticks ```html - + - - - Example HTML5 Document - - -

Test

- + + + Example HTML5 Document + + +

Test

+ ``` @@ -102,7 +108,9 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou #### Code block with Hugo's internal highlight shortcode + {{< highlight html >}} + @@ -125,19 +133,19 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou #### Unordered List -* List item -* Another item -* And another item +- List item +- Another item +- And another item #### Nested list -* Fruit - * Apple - * Orange - * Banana -* Dairy - * Milk - * Cheese +- Fruit + - Apple + - Orange + - Banana +- Dairy + - Milk + - Cheese ## Other Elements — abbr, sub, sup, kbd, mark diff --git a/content/posts/markdown-syntax.md b/content/posts/markdown-syntax.md index 943d2bb3..0530c96b 100644 --- a/content/posts/markdown-syntax.md +++ b/content/posts/markdown-syntax.md @@ -21,6 +21,7 @@ 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. + ## Headings @@ -28,10 +29,15 @@ This article offers a sample of basic Markdown syntax that can be used in Hugo c The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. # H1 + ## H2 + ### H3 + #### H4 + ##### H5 + ###### H6 ## Paragraph @@ -47,7 +53,7 @@ The blockquote element represents content that is quoted from another source, op #### Blockquote without attribution > Tiam, ad mint andaepu dandae nostion secatur sequo quae. -> **Note** that you can use *Markdown syntax* within a blockquote. +> **Note** that you can use _Markdown syntax_ within a blockquote. #### Blockquote with attribution @@ -60,31 +66,31 @@ The blockquote element represents content that is quoted from another source, op Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. - Name | Age ---------|------ - Bob | 27 - Alice | 23 +| Name | Age | +| ----- | --- | +| Bob | 27 | +| Alice | 23 | #### Inline Markdown within tables | Italics | Bold | Code | -| -------- | -------- | ------ | -| *italics* | **bold** | `code` | +| --------- | -------- | ------ | +| _italics_ | **bold** | `code` | ## Code Blocks #### Code block with backticks ```html - + - - - Example HTML5 Document - - -

Test

- + + + Example HTML5 Document + + +

Test

+ ``` @@ -102,7 +108,9 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou #### Code block with Hugo's internal highlight shortcode + {{< highlight html >}} + @@ -125,19 +133,19 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou #### Unordered List -* List item -* Another item -* And another item +- List item +- Another item +- And another item #### Nested list -* Fruit - * Apple - * Orange - * Banana -* Dairy - * Milk - * Cheese +- Fruit + - Apple + - Orange + - Banana +- Dairy + - Milk + - Cheese ## Other Elements — abbr, sub, sup, kbd, mark diff --git a/content/posts/math-typesetting.md b/content/posts/math-typesetting.md index 48fdc79f..bdb49299 100644 --- a/content/posts/math-typesetting.md +++ b/content/posts/math-typesetting.md @@ -7,13 +7,14 @@ math: true --- Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. + In this example we will be using [KaTeX](https://katex.org/) -- Create a partial under `/layouts/partials/math.html` -- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. -- Include the partial in your templates like so: +- Create a partial under `/layouts/partials/math.html` +- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. +- Include the partial in your templates like so: ```bash {{ if or .Params.math .Site.Params.math }} @@ -21,13 +22,14 @@ In this example we will be using [KaTeX](https://katex.org/) {{ end }} ``` -- To enable KaTex globally set the parameter `math` to `true` in a project's configuration -- To enable KaTex on a per page basis include the parameter `math: true` in content files +- To enable KaTex globally set the parameter `math` to `true` in a project's configuration +- To enable KaTex on a per page basis include the parameter `math: true` in content files **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) {{< math.inline >}} {{ if or .Page.Params.math .Site.Params.math }} + @@ -38,12 +40,14 @@ In this example we will be using [KaTeX](https://katex.org/) ### Examples {{< math.inline >}} +

Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)

{{}} Block math: + $$ - \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } + \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } $$ diff --git a/content/posts/papermod/_index.md b/content/posts/papermod/_index.md index 85f141cb..710c008d 100644 --- a/content/posts/papermod/_index.md +++ b/content/posts/papermod/_index.md @@ -1,4 +1,4 @@ --- title: Sub-Section PaperMod summary: Contains posts related to `PaperMod` ---- \ No newline at end of file +--- diff --git a/content/posts/papermod/papermod-features.md b/content/posts/papermod/papermod-features.md index e3d7104a..89258b00 100644 --- a/content/posts/papermod/papermod-features.md +++ b/content/posts/papermod/papermod-features.md @@ -3,17 +3,19 @@ title: "Papermod - Features" date: 2020-09-16T11:30:03+05:30 showToc: true weight: 2 -aliases: ['/papermod-features'] -tags: ['PaperMod'] +aliases: ["/papermod-features"] +tags: ["PaperMod"] author: "Aditya Telange" tocopen: true --- ### 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 -- [fingerprint/intergity](https://gohugo.io/hugo-pipes/fingerprint/) check. + +- [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 +- [fingerprint/intergity](https://gohugo.io/hugo-pipes/fingerprint/) check. --- @@ -25,6 +27,7 @@ params: # defaultTheme: dark defaultTheme: auto # to switch between dark or light according to browser theme ``` + --- @@ -36,7 +39,7 @@ Shows icon besides title of page to change theme To disable it : ```yml -disableThemeToggle : true +disableThemeToggle: true ``` --- @@ -52,6 +55,7 @@ layout: "archives" # is necessary url: "/archive" summary: "archive" --- + ``` **Note:** Archives Layout does not support Multilingual Month Translations. @@ -65,6 +69,7 @@ ex: [archives.md](https://raw.githubusercontent.com/adityatelange/hugo-PaperMod/ Use 1st entry as some Information add following to config file + ```yml params: homeInfoParams: @@ -126,27 +131,29 @@ In post's page-variables add : ```yml cover: - image: '' - # can also paste direct link from external site - # ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png - alt: '' - caption: '' + image: "" + # can also paste direct link from external site + # ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png + alt: "" + caption: "" ``` When you include images in the [Page Bundle](https://gohugo.io/content-management/page-bundles/), multiple sizes of the image will automatically be provided using the HTML5 `srcset` field. To reduce generation time and size of the site, you can disable this feature using + ```yml params: - cover: - responsiveImages: false + cover: + responsiveImages: false ``` To enable hyperlinks to the full image size on post pages, use + ```yml params: - cover: - linkFullImages: true + cover: + linkFullImages: true ``` --- @@ -156,6 +163,7 @@ params: Displays Share Buttons at Bottom of each post to show share buttons add + ```yml params: ShowShareButtons: true @@ -168,6 +176,7 @@ params: Displays Reading Time (the estimated time, in minutes, it takes to read the content.) To show reading time add + ```yml Params: ShowReadingTime: true @@ -180,11 +189,13 @@ Params: Displays ToC on blog-pages To show ToC add following to page-variables + ```yml ShowToc: true ``` To keep Toc Open **by default** on a post add following to page-variables: + ```yml TocOpen: true ``` @@ -199,11 +210,11 @@ To Use multiple authors for a post, in post-variables: --- author: ["Me", "You"] --- + ``` To use Multiple Authors Site-wide, in `config.yml`: - ```yml params: author: ["Me", "You"] diff --git a/content/posts/papermod/papermod-how-to.md b/content/posts/papermod/papermod-how-to.md index d1adbdc7..30e32853 100644 --- a/content/posts/papermod/papermod-how-to.md +++ b/content/posts/papermod/papermod-how-to.md @@ -3,8 +3,8 @@ title: "Papermod - How To's Guide" date: 2020-09-18T11:30:03+05:30 showtoc: true tocOpen: true -aliases: ['/papermod-how-to-guide'] -tags: ['PaperMod'] +aliases: ["/papermod-how-to-guide"] +tags: ["PaperMod"] author: "Aditya Telange" draft: true --- @@ -21,7 +21,6 @@ By Hugo's Lookup Order, you can override any part of a theme that you want. The Let's say you wish the `list` was different. All you have to do is copy the `list` template: - ```shell your-site/themes/papermod/layouts/_defaults/list.html ``` @@ -43,7 +42,7 @@ These include OpenGraph, Twitter Cards and Schema. ```yml params: - env: production + env: production ``` or set `HUGO_ENV` as "production" in system env-vars @@ -72,10 +71,11 @@ layout: "archives" url: "/archives/" summary: archives --- + ``` --- ## References - - [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/) +- [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/) diff --git a/content/posts/papermod/papermod-icons.md b/content/posts/papermod/papermod-icons.md index e982487e..c129d1a2 100644 --- a/content/posts/papermod/papermod-icons.md +++ b/content/posts/papermod/papermod-icons.md @@ -4,12 +4,13 @@ date: 2020-09-17T11:30:03+05:30 showtoc: true tocopen: true weight: 3 -aliases: ['/papermod-icons'] -tags: ['PaperMod'] +aliases: ["/papermod-icons"] +tags: ["PaperMod"] author: "Aditya Telange" --- ## Social Icons + Usage : ``` @@ -73,7 +74,7 @@ Usage: ```yml params: - ShowShareButtons: true + ShowShareButtons: true ``` ![](https://i.ibb.co/sPN8bgd/paper-mod-share-butons.png) diff --git a/content/posts/papermod/papermod-installation.md b/content/posts/papermod/papermod-installation.md index d443de54..d71e9052 100644 --- a/content/posts/papermod/papermod-installation.md +++ b/content/posts/papermod/papermod-installation.md @@ -3,8 +3,8 @@ title: "Papermod - Installation" date: 2020-09-15T11:30:03+05:30 series: ["PaperMod"] weight: 1 -aliases: ['/papermod-installation'] -tags: ['PaperMod'] +aliases: ["/papermod-installation"] +tags: ["PaperMod"] author: "Aditya Telange" showToc: true TocOpen: true @@ -22,26 +22,29 @@ 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`: -> +> > Then change in `config.yml`: + ```yml theme: "hugo-PaperMod" ``` @@ -133,8 +136,8 @@ params: title: "My 1st post" date: 2020-09-15T11:30:03+00:00 weight: 1 -aliases: ['/first'] -tags: ['first'] +aliases: ["/first"] +tags: ["first"] author: "Me" # author: ["Me", "You"] # multiple authors showToc: true @@ -143,16 +146,19 @@ draft: false hidemeta: false disableShare: false cover: - image: '' - alt: '' - caption: '' - relative: false + image: "" + alt: "" + caption: "" + relative: false comments: false --- + ``` --- -### [Papermod - Features](../papermod-features) -### [Papermod - How to Guide](../papermod-how-to-guide) -### [Papermod - Icons](../papermod-icons) +### [Papermod - Features](../papermod-features) + +### [Papermod - How to Guide](../papermod-how-to-guide) + +### [Papermod - Icons](../papermod-icons) diff --git a/content/posts/papermod/papermod-variables.md b/content/posts/papermod/papermod-variables.md index 293be4f3..4ed6b439 100644 --- a/content/posts/papermod/papermod-variables.md +++ b/content/posts/papermod/papermod-variables.md @@ -3,30 +3,32 @@ title: "Papermod - Variables" date: 2020-09-24T11:33:33+05:30 showToc: true TocOpen: true -tags: ['PaperMod'] +tags: ["PaperMod"] author: "Aditya Telange" draft: true --- ## Variables in PaperMod + Below are variables used with this theme... ### Site Variables -| name | type | example | -| - | - | - | -| ShowReadingTime | boolean | true \| false | -| defaultTheme | string | light \| dark \| auto | -| ShowShareButtons | boolean | true \| false | -| cover.linkFullImages | boolean | true \| false | -| cover.responsiveImages | boolean | true \| false | + +| name | type | example | +| ---------------------- | ------- | --------------------- | +| ShowReadingTime | boolean | true \| false | +| defaultTheme | string | light \| dark \| auto | +| ShowShareButtons | boolean | true \| false | +| cover.linkFullImages | boolean | true \| false | +| cover.responsiveImages | boolean | true \| false | ### Page Variables -| name | type | example | -| - | - | - | -| showtoc | boolean | true \| false | -| tocopen | boolean | true \| false | -| hidemeta | boolean | true \| false | -| cover.image | string | `'featured.jpg'` | -| cover.caption | string | `''` | -| cover.alt | string | `''` | +| name | type | example | +| ------------- | ------- | ---------------- | +| showtoc | boolean | true \| false | +| tocopen | boolean | true \| false | +| hidemeta | boolean | true \| false | +| cover.image | string | `'featured.jpg'` | +| cover.caption | string | `''` | +| cover.alt | string | `''` | diff --git a/content/posts/placeholder-text.md b/content/posts/placeholder-text.md index bac7c476..0f2e1c87 100644 --- a/content/posts/placeholder-text.md +++ b/content/posts/placeholder-text.md @@ -37,10 +37,12 @@ Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. -Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. +Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, _oculos nomen_ non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. {{< css.inline >}} + + {{< /css.inline >}} diff --git a/content/posts/rich-content.md b/content/posts/rich-content.md index f97624da..01ee0b0e 100644 --- a/content/posts/rich-content.md +++ b/content/posts/rich-content.md @@ -11,12 +11,11 @@ ShowToc = true +++ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. - ---- + +## ## Instagram Simple Shortcode -
---