From 1d82ac91f5eaf7864a0da9a56320b2228368a327 Mon Sep 17 00:00:00 2001 From: 1bl4z3r <1bl4z3r@users.noreply.github.com> Date: Sat, 28 Oct 2023 16:55:38 +0000 Subject: [PATCH] deploy: 39a5083f06cc501e1a88e61860f726db1dcab451 --- en/index.xml | 4 +-- en/posts/admonition-shortcode/index.html | 2 +- en/posts/creating-a-new-theme/index.html | 2 +- en/posts/explaining-configs/index.html | 8 +++--- en/posts/goisforlovers/index.html | 2 +- en/posts/hugoisforlovers/index.html | 2 +- en/posts/index.xml | 27 ++++++++++---------- en/posts/long-article/index.html | 2 +- en/posts/mathjax-support/index.html | 2 +- en/posts/migrate-from-jekyll/index.html | 2 +- en/posts/post-with-featured-image/index.html | 2 +- en/posts/the-figure-shortcode/index.html | 2 +- en/posts/the-new-scroll/index.html | 2 +- en/posts/typography/index.html | 2 +- en/sitemap.xml | 2 +- en/tags/demo/index.xml | 4 +-- sitemap.xml | 2 +- 17 files changed, 35 insertions(+), 34 deletions(-) diff --git a/en/index.xml b/en/index.xml index d6423cf..32a2416 100644 --- a/en/index.xml +++ b/en/index.xml @@ -1,6 +1,6 @@ Hermit - V2https://1bl4z3r.github.io/hermit-V2/en/Recent content on Hermit - V2Hugo -- gohugo.ioenSun, 22 Oct 2023 20:06:06 +0530Explaining Configshttps://1bl4z3r.github.io/hermit-V2/en/posts/explaining-configs/Sun, 22 Oct 2023 20:06:06 +0530https://1bl4z3r.github.io/hermit-V2/en/posts/explaining-configs/Configuation in hugo.toml hugo.toml represents Global configuration for Hermit - V2. It is indicative on the changes to make the theme tailored to your personal preferences. -baseURL : The absolute URL (protocol, host, path, and trailing slash) of your published site. Required :- YES -languageCode - A language tag as defined by RFC 5646. This value is used to populate: +baseURL : The absolute URL (protocol, host, path, and trailing slash) of your published site. +languageCode : A language tag as defined by RFC 5646. This value is used to populate: The element in the internal RSS template The lang attribute of the element in the internal alias template title - Title of the SiteAdmonition Shortcodehttps://1bl4z3r.github.io/hermit-V2/en/posts/admonition-shortcode/Fri, 20 Oct 2023 20:06:06 +0530https://1bl4z3r.github.io/hermit-V2/en/posts/admonition-shortcode/The admonition shortcode supports 8 types of banners to help you put a notice on your page. Markdown or HTML format in the content is supported. This is a note A note banner This is an info A info banner Tip A tip banner Success A success banner Warning A warning banner Failure A failure banner Danger A danger banner Bug A bug banner The admonition shortcode has the following named parameters:About Michael Hendersonhttps://1bl4z3r.github.io/hermit-V2/en/michael-henderson/Sat, 23 Sep 2023 00:00:00 +0000https://1bl4z3r.github.io/hermit-V2/en/michael-henderson/Hi there, my name is Michael Henderson. I&rsquo;m a passionate photographer and programmer with a love for adventure and the great outdoors. When I&rsquo;m not coding or snapping photos, you can find me cruising around town on my bike, exploring new trails and enjoying the fresh air. I&rsquo;m always looking for opportunities to combine my interests and capture beautiful moments through my camera lens. Nice to meet you! diff --git a/en/posts/admonition-shortcode/index.html b/en/posts/admonition-shortcode/index.html index af9c3b3..178b0db 100644 --- a/en/posts/admonition-shortcode/index.html +++ b/en/posts/admonition-shortcode/index.html @@ -1,6 +1,6 @@ Admonition Shortcode

Admonition Shortcode


The admonition shortcode supports 8 types of banners to help you put a notice on your page.

Markdown or HTML format in the content is supported.

The admonition shortcode has the following named parameters:

  • type [optional] (first positional parameter)

    Type of the admonition banner, the default value is note.

  • title [optional] (second positional parameter)

    Title of the admonition banner, the default value is the value of the type parameter.

Example admonition input:

{{< admonition type=tip title="This is a tip" >}}
 A **tip** banner
 {{< /admonition >}}
diff --git a/en/posts/creating-a-new-theme/index.html b/en/posts/creating-a-new-theme/index.html
index 3bfe226..f2b7c3d 100644
--- a/en/posts/creating-a-new-theme/index.html
+++ b/en/posts/creating-a-new-theme/index.html
@@ -3,7 +3,7 @@
 We’ll start with creating a new site with a very basic template.">Creating a New Theme

Creating a New Theme


Introduction

This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I’ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won’t cover using CSS to style your theme.

We’ll start with creating a new site with a very basic template. Then we’ll add in a few pages and posts. With small variations on that, you will be able to create many different types of web sites.

In this tutorial, commands that you enter will start with the “$” prompt. The output will follow. Lines that start with “#” are comments that I’ve added to explain a point. When I show updates to a file, the “:wq” on the last line means to save the file.

Here’s an example:

## this is a comment
 $ echo this is a command
 this is a command
diff --git a/en/posts/explaining-configs/index.html b/en/posts/explaining-configs/index.html
index cdfe29b..15e4bf4 100644
--- a/en/posts/explaining-configs/index.html
+++ b/en/posts/explaining-configs/index.html
@@ -1,7 +1,7 @@
-Explaining Configs

Explaining Configs


Configuation in hugo.toml

hugo.toml represents Global configuration for Hermit - V2. It is indicative on the changes to make the theme tailored to your personal preferences.

baseURL : The absolute URL (protocol, host, path, and trailing slash) of your published site. Required :- YES

  • languageCode - A language tag as defined by RFC 5646. This value is used to populate:

    • The element in the internal RSS template
    • The lang attribute of the element in the internal alias template
  • title - Title of the Site

  • enableGitInfo - Enable .GitInfo object for each page (if the Hugo site is versioned by Git). This will then update the Lastmod parameter for each page using the last git commit date for that content file.

    Sideeffect : Affects .Lastmod parameter in Pages

  • hasCJKLanguage - If Chinese/Japanese/Korean is your main content language, enable this to make wordCount works right.

  • pygmentsCodefences -Set to true to enable syntax highlighting in code fences with a language tag in markdown.

  • pygmentsUseClasses - Set to true to use CSS classes to format your highlighted code.

  • rssLimit - Maximum number of items in the RSS feed.

  • copyright - This message is only used by the RSS template.

  • enableEmoji : Enables shorthand emojis in content files. Info

  • googleAnalytics : Enter Google Analytics UA code to invoke inbuilt Google Analytics.

  • disqusShortname : To enable Disqus.

  • [author]

    • name : Name of Site-wide or default author.
    • about : Name of the about page of the Site-wide or default author.
  • [params]

    • dateform / dateformShort / dateformNum / dateformNumTime : Used to render properly formatted date & time. Change this if you know what you are doing.
    • description : Put in default description for meta description.
    • images : Put in if you want a background image.
    • themeColor: Populates theme-color meta. Make sure to keep $theme in _predefined.scss and this same for better color consistency.
    • homeSubtitle : Displays subtitle in Homepage.
    • footerCopyright : Custom copyright for footer.
    • bgImg : Homepage background-image URL.
    • gitUrl : Prefix of link to the git commit detail page. GitInfo must be enabled.
    • justifyContent : Set “text-align: justify” to .content. Toggling this option needs to rebuild SCSS, requires Hugo extended version.
    • relatedPosts : Add a related content section to all single posts page.
    • code_copy_button : Turn on/off the code-copy-button for code-fields.
    • homeSubtitlePrinter : Allows homeSubtitle to be shown with printer animation effect.
    • scrollToTop : Enables Scroll to Top button Site wide.
    • global_mathjax : Enable global_mathjax to true, if you want MathJax support sitewide (if you have technical page)
    • readTime : Toggle Reading time for articles.
    • readTimeSeparator : Specifies Separator between wordCount and readTime.
    • [params.social] Refer README
      • name : Name of the social page.
      • url : URL of your account.
    • [menu] - Display menu items in Homepage as well as in menubar. To make more menu items, use [[menu.main]]

Configuration in page Frontmatter

As described in Hugo docs

Front matter allows you to keep metadata attached to an instance of a content type—i.e., embedded inside a content file—and is one of the many features that gives Hugo its strength.

  • title : Page’s title
  • slug : A slug is the part of a URL that identifies a particular page on a website in an easy-to-read form.
  • date : Date of creation of the page.
  • draft : If you want to un-publish the page.
  • featuredImg : To have a unique image for the page. Shown as background image. Can be toggled to fullscreen with special button in menu.
  • description : Description for the Page.
  • tags : Allows to define tags.
  • author : Allows to specify page author.
  • authorLink : Allows to supply separate author bio.
  • scrolltotop : Toggles scroll to top button for that particular page.
  • mathjax : Enable Per-Page MathJax support.
  • toc : Enables Table of Contents.
  • custom_css : Allows to supply custom CSS by placing the css files in /static/css/. CSS will be invoked for that page only.
  • custom_js : Allows to supply custom CSS by placing the css files in /static/js/. JS will be invoked for that page only.
  • ShowLastmod :This enables Last modification date of the given Page.
  • Lastmod : REQUIRED (If ShowLastmod=true). Enter Last modified date of the Page.

Special Caveats

Last Modified Date

If ShowLastmod:true :

  • If enableGitInfo = true, then Git Hash will be shown in [...] after Date.
  • If enableGitInfo = false, then:
    • If Lastmod is not provided or Lastmod has same value as Date, error will be thrown.
    • If Lastmod is provided or Lastmod is different from Date, value of Lastmod will be displayed in [...] after Date.

If ShowLastmod is not provided. User response defaults to false. It is equivalent to providing ShowLastmod:false.

LaTeX

LaTeX is implemented through Mathjax.

  • If you are using this theme as a proper mathematical blog, enable global_mathjax to true in hugo.toml. It will enable Mathjax support site wide.
  • Since Mathjax is a heavy script (>1 MB), it is not ideal to run Mathjax site wide, especially if you are in the above cohort. However, if you want to use mathematical formulas, you can set mathjax : true in Page frontmatter. It will enable mathjax for only that page only.

Depreciation of images

images (in hugo.toml) is depreciated and will be removed in future versions. It is an attempt to reduce unnecessary bloat and make the theme as minimal as possible. Please refrain from using this. If you really need this feature, open an issue in GitHub.

Enable ScrolltoTop button

To enable scroll to top, you must enable scrollToTop in hugo.toml and scrolltotop in Page Frontmatter. This is to prevent scroll to top button from showing if the page has very less content. If you feel that for the content, you need scroll to top button, follow below steps:

  1. Open hugo.toml and set scrollToTop = true
  2. Open the Markdown content file and set scrolltotop : true in Page Frontmatter

Support for Guest Authors

If blog has more than one author or if you want to invite Guest Authors, here’s how to do.

  • If author is not Site Author:
    1. Update author to the Author’s name in Page Frontmatter.
    2. Create a markdown file in /content directory. (eg. author-1.md)
    3. Add the markdown file to Page Frontmatter as authorLink (eg. authorLink = author-1)
  • If authorLink is not provided, but author is provided. Link will be referenced to Site author’s page as defined in author.about in hugo.toml
  • If Neither author nor authorLink is provided. Author will be referenced to Site author (as defined in author.name) and the link will referenced to Site author’s page as defined in author.about in hugo.toml