Skip to main content

Lukia

KIGA
Author
KIGA
This is a personal blog, intended for sharing.
Table of Contents
Documentation - This article is part of a series.
Part 1: This Article

Occasionally, I express gratitude for the mundane aspects of daily life, although they may seem unremarkable.

There are myriad aspirations that occupy my thoughts, such as the pursuit of artistic expression through the medium of painting.

Watching films, indulging in hotpot delicacies at nearby restaurants, or leisurely watching television dramas at home, life may be calm but nonetheless pleasant

Youtube
#

Twitter
#

Detail
#

In addition to all the default Hugo shortcodes, Blowfish adds a few extras for additional functionality.

Alert
#

alert outputs its contents as a stylised message box within your article. It’s useful for drawing attention to important information that you don’t want the reader to miss.

Parameter Description
icon Optional. the icon to display on the left side.
Default: exclaimation triangle icon (Check out the icon shortcode for more details on using icons.)
iconColor Optional. the color for the icon in basic CSS style.
Can be either hex values (#FFFFFF) or color names (white)
By default chosen based on the current color theme .
cardColor Optional. the color for the card background in basic CSS style.
Can be either hex values (#FFFFFF) or color names (white)
By default chosen based on the current color theme .
textColor Optional. the color for the text in basic CSS style.
Can be either hex values (#FFFFFF) or color names (white)
By default chosen based on the current color theme .

The input is written in Markdown so you can format it however you please.

Example 1: No params

{{< alert >}}
**Warning!** This action is destructive!
{{< /alert >}}
Warning! This action is destructive!

Example 2: Unnamed param

{{< alert "twitter" >}}
Don't forget to [follow me](https://twitter.com/nunocoracao) on Twitter.
{{< /alert >}}
Don’t forget to follow me on Twitter.

Example 3: Named params

{{< alert icon="fire" cardColor="#e63946" iconColor="#1d3557" textColor="#f1faee" >}}
This is an error!
{{< /alert >}}
This is an error!




Article
#

Article will embed a single article into a markdown file. The link to the file should be the .RelPermalink of the file to be embedded. Note that the shortcode will not display anything if it’s referencing it’s parent. Note: if you are running your website in a subfolder like Blowfish (i.e. /blowfish/) please include that path in the link.

Parameter Description
link Required. the .RelPermalink to the target article.

Example:

{{< article link="/docs/welcome/" >}}




Badge
#

badge outputs a styled badge component which is useful for displaying metadata.

Example:

{{< badge >}}
New article!
{{< /badge >}}
New article!




Button
#

button outputs a styled button component which can be used to highlight a primary action. It has two optional variables href and target which can be used to specify the URL and target of the link.

Example:

{{< button href="#button" target="_self" >}}
Call to action
{{< /button >}}
Call to action




Carousel #

carousel is used to showcase multiple images in an interactive and visually appealing way. This allows a user to slide through multiple images while only taking up the vertical space of a single one. All images are displayed using the full width of the parent component and using one of the predefined aspect ratios of 16:9, 21:9 or 32:9.

Parameter Description
images Required. A regex string to match image names.
aspectRatio Optional. The aspect ratio for the carousel. Either 16-9, 21-9 or 32-9. It is set to 16-9 by default.
interval Optional. The interval for the auto-scrooling, specified in milliseconds. Defaults to 2000 (2s)

Example 1: 16:9 aspect ratio and verbose list of images

{{< carousel images="{gallery/03.jpg, gallery/01.jpg, gallery/02.jpg, gallery/04.jpg}" >}}

Example 2: 21:9 aspect ratio and regex-ed list of images

{{< carousel images="gallery/*" aspectRatio="21-9" interval="2500" >}}




Chart
#

chart uses the Chart.js library to embed charts into articles using simple structured data. It supports a number of different chart styles and everything can be configured from within the shortcode. Simply provide the chart parameters between the shortcode tags and Chart.js will do the rest.

Refer to the official Chart.js docs for details on syntax and supported chart types.

Example:

{{< chart >}}
type: 'bar',
data: {
  labels: ['Tomato', 'Blueberry', 'Banana', 'Lime', 'Orange'],
  datasets: [{
    label: '# of votes',
    data: [12, 19, 3, 5, 3],
  }]
}
{{< /chart >}}




Gallery #

gallery allows you to showcase multiple images at once, in a responsive manner with more varied and interesting layouts.

In order to add images to the gallery, use img tags for each image and add class="grid-wXX" in order for the gallery to be able to identify the column width for each image. The widths available by default start at 10% and go all the way to 100% in 5% increments. For example, to set the width to 65%, set the class to grid-w65. Additionally, widths for 33% and 66% are also available in order to build galleries with 3 cols. You can also leverage tailwind’s responsive indicators to have a reponsive grid.

Example: responsive gallery

{{< gallery >}}
  <img src="gallery/01.jpg" class="grid-w50 md:grid-w33 xl:grid-w33" />
  <img src="gallery/02.jpg" class="grid-w50 md:grid-w33 xl:grid-w33" />
  <img src="gallery/03.jpg" class="grid-w50 md:grid-w33 xl:grid-w33" />
  <img src="gallery/04.jpg" class="grid-w50 md:grid-w33 xl:grid-w33" />
  <img src="gallery/05.jpg" class="grid-w50 md:grid-w33 xl:grid-w33" />
  <img src="gallery/06.jpg" class="grid-w50 md:grid-w33 xl:grid-w33" />
  <img src="gallery/07.jpg" class="grid-w50 md:grid-w33 xl:grid-w33" />
{{< /gallery >}}




GitHub Card
#

github allows you to quickly link a github repository, all while showing and updating in realtime stats about it, such as the number of stars and forks it has.

Parameter Description
repo [String] github repo in the format of username/repo

Example 1:

{{< github repo="kiga-hub/deployment-docker-compose" >}}
kiga-hub/deployment-docker-compose

Deploying stacks using Docker Compose.

Makefile
0
0




Katex
#

The katex shortcode can be used to add mathematical expressions to article content using the KaTeX package. Refer to the online reference of supported TeX functions for the available syntax.

To include mathematical expressions in an article, simply place the shortcode anywhere with the content. It only needs to be included once per article and KaTeX will automatically render any markup on that page. Both inline and block notation are supported.

Inline notation can be generated by wrapping the expression in \\( and \\) delimiters. Alternatively, block notation can be generated using $$ delimiters.

Example:

{{< katex >}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\)

\(f(a,b,c) = (a^2+b^2+c^2)^3\)

Check out the page for more examples.




Lead
#

lead is used to bring emphasis to the start of an article. It can be used to style an introduction, or to call out an important piece of information. Simply wrap any Markdown content in the lead shortcode.

Example:

{{< lead >}}
When life gives you lemons, make lemonade.
{{< /lead >}}
When life gives you lemons, make lemonade.




List
#

List will display a list of recent articles. This shortcode requires a limit value to constraint the list. Additionally, it supports a where and a value in order to filter articles by their parameters. Note that this shortcode will not display its parent page but it will count for the limit value.

Parameter Description
limit Required. the number of recent articles to display.
title Optional title for the list, default is Recent
where The variable to be used for the query of articles e.g. Type
value The value that will need to match the parameter defined in where for the query of articles e.g. for where == Type a valid value could be sample
The where and value values are used in the following query where .Site.RegularPages $where $value in the code of the shortcode. Check Hugo docs to learn more about which parameters are available to use.

Example #1:

{{< list limit=2 >}}

Recent

Linux upgrade gcc g++
Linux
Docker & docker-compose installation process on ubuntu20.04
docker

Example #2:

{{< list title="Samples" limit=5 where="Type" value="sample" >}}

Samples




TypeIt
#

TypeIt is the most versatile JavaScript tool for creating typewriter effects on the planet. With a straightforward configuration, it allows you to type single or multiple strings that break lines, delete & replace each other, and it even handles strings that contain complex HTML.

Blowfish implements a sub-set of TypeIt features using a shortcode. Write your text within the typeit shortcode and use the following parameters to configure the behavior you want.

Parameter Description
tag [String] html tag that will be used to render the strings.
classList [String] List of css classes to apply to the html element.
initialString [String] Initial string that will appear written and will be replaced.
speed [number] Typing speed, measured in milliseconds between each step.
lifeLike [boolean] Makes the typing pace irregular, as if a real person is doing it.
startDelay [number] The amount of time before the plugin begins typing after being initialized.
breakLines [boolean] Whether multiple strings are printed on top of each other (true), or if they’re deleted and replaced by each other (false).
waitUntilVisible [boolean] Determines if the instance will begin when loaded or only when the target element becomes visible in the viewport. The default is true
loop [boolean] Whether your strings will continuously loop after completing

Example 1:

{{< typeit >}}
Lorem ipsum dolor sit amet 
{{< /typeit >}}

Example 2:

{{< typeit 
  tag=h1
  lifeLike=true
>}}
Lorem ipsum dolor sit amet, 
consectetur adipiscing elit. 
{{< /typeit >}}

Example 3:

{{< typeit 
  tag=h3
  speed=50
  breakLines=false
  loop=true
>}}
Lorem ipsum dolor sit amet, 
consectetur adipiscing elit. 
{{< /typeit >}}

Documentation - This article is part of a series.
Part 1: This Article