Merge pull request #476 from nunocoracao/474-typos-in-list-shortcode-documentation

🐛 fixed typos in list shortcode docs
This commit is contained in:
Nuno Coração 2023-01-24 22:35:50 +00:00 committed by GitHub
commit abfbdb8a4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 28 additions and 13 deletions

View file

@ -103,10 +103,10 @@ Call to action
<!-- prettier-ignore-start -->
| 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. |
| 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. |
<!-- prettier-ignore-end -->
**Example 1:** 16:9 aspect ratio and verbose list of images
@ -325,11 +325,15 @@ When life gives you lemons, make lemonade.
`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.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ------------------------------------------------------- |
| `limit` | **Required.** the number of recent articles to display. |
| `where` | the number of recent articles to display. |
| `value` | the number of recent articles to display. |
| Parameter | Description |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `limit` | **Required.** the number of recent articles to display. |
| `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` |
{{< alert >}}
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](https://gohugo.io/variables/page/) to learn more about which parameters are available to use.
{{</ alert >}}
<!-- prettier-ignore-end -->
@ -344,10 +348,11 @@ When life gives you lemons, make lemonade.
**Example #2:**
```md
{{</* list limit=2 where="Type" value="sample" */>}}
{{</* list limit=5 where="Type" value="sample" */>}}
```
{{< list limit=2 where="Type" value="sample">}}
{{< list limit=5 where="Type" value="sample">}}
<br/><br/><br/>

View file

@ -5,6 +5,7 @@ description: "Guide to Chart.js usage in Blowfish"
summary: "Blowfish includes Chart.js for powerful charts and data visualisations."
tags: ["chart", "sample", "graph", "shortcodes"]
showDate: false
type: 'sample'
---
Blowfish includes support for Chart.js using the `chart` shortcode. Simply wrap the chart markup within the shortcode. Blowfish automatically themes charts to match the configured `colorScheme` parameter, however the colours can be customised using normal Chart.js syntax.

View file

@ -4,6 +4,7 @@ date: 2019-03-06
description: "Guide to Mermaid usage in Blowfish"
summary: "It's easy to add diagrams and flowcharts to articles using Mermaid."
tags: ["mermaid", "sample", "diagram", "shortcodes"]
type: 'sample'
---
Mermaid diagrams are supported in Blowfish using the `mermaid` shortcode. Simply wrap the diagram markup within the shortcode. Blowfish automatically themes Mermaid diagrams to match the configured `colorScheme` parameter.

View file

@ -9,6 +9,7 @@ showViews: false
_build:
render: "false"
list: "local"
type: 'sample'
---
This page uses the `externalUrl` front matter parameter to link to an article outside of this Hugo website.

View file

@ -6,6 +6,7 @@ draft: false
description: "Icon support in Blowfish."
slug: "icons"
tags: ["icons", "sample", "shortcodes"]
type: 'sample'
---
Blowfish has built-in support for a number of [FontAwesome 6](https://fontawesome.com/icons) icons. These can be included in your website through either the [icon partial]({{< ref "docs/partials#icon" >}}) or [icon shortcode]({{< ref "docs/shortcodes#icon" >}}).

View file

@ -3,6 +3,7 @@ title: "Markdown"
date: 2019-03-11
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
tags: ["markdown", "css", "html", "sample"]
type: 'sample'
---
This article offers a sample of basic Markdown formatting that can be used in Blowfish, also it shows how some basic HTML elements are decorated.

View file

@ -3,6 +3,7 @@ title: Mathematical notation
date: 2019-03-08
description: A brief sample of mathematical notation in Blowfish.
tags: ["sample", "katex", "maths", "shortcodes"]
type: 'sample'
---
KaTeX can be used to render mathematical notation within articles.

View file

@ -9,6 +9,7 @@ showAuthor: false
authors:
- "nunocoracao"
- "secondauthor"
type: 'sample'
---
This is an example of how an article with multiple authors will look like.

View file

@ -7,6 +7,7 @@ description: "Lorem Ipsum Dolor Si Amet"
tags: ["markdown", "text", "sample", "latin"]
showDateUpdated: true
xml: false
type: 'sample'
---
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.

View file

@ -4,6 +4,7 @@ date: 2019-03-10
description: "A brief description of Hugo Shortcodes"
summary: "This is an _example_ of a **rich** content summary."
tags: ["shortcodes", "privacy", "sample", "gist", "twitter", "youtube", "vimeo"]
type: 'sample'
---
Hugo ships with several [built-in shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-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.

View file

@ -6,6 +6,7 @@ description: "Turn on thumbnails for your articles."
slug: "thumbnail_sample"
tags: ["thumbnail", "sample"]
summary: "A quick example of how to start using Thumbnails in your artciles."
type: 'sample'
---
A quick example of how to start using Thumbnails in your articles.

View file

@ -1,12 +1,12 @@
{{ $limit := .Get "limit" }}
{{ $limit := .Get "limit" | default 1 }}
{{ $parent := .Page.RelPermalink }}
{{ $where := .Get "where" }}
{{ $value := .Get "value" }}
<h2 class="mt-20 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
<section class="space-y-10 w-full mt-10 mb-10">
{{ if $where }}
{{ range ( where .Site.RegularPages $where $value | first 1 ) }}
{{ range ( where .Site.RegularPages $where $value | first $limit ) }}
{{ if not (eq .RelPermalink $parent) }}
{{ partial "article-link/simple.html" . }}
{{ end }}