mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 02:11:52 +02:00
final polish
This commit is contained in:
parent
3652ad0a5b
commit
0dd1c14e74
12 changed files with 15 additions and 5 deletions
|
@ -329,7 +329,7 @@ When life gives you lemons, make lemonade.
|
||||||
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `limit` | **Required.** the number of recent articles to display. |
|
| `limit` | **Required.** the number of recent articles to display. |
|
||||||
| `where` | The variable to be used for the query of articles e.g. `Type` |
|
| `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 vaue could be `sample` |
|
| `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 >}}
|
{{< 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.
|
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.
|
||||||
|
@ -348,10 +348,10 @@ The `where` and `value` values are used in the following query `where .Site.Regu
|
||||||
**Example #2:**
|
**Example #2:**
|
||||||
|
|
||||||
```md
|
```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/>
|
<br/><br/><br/>
|
||||||
|
|
|
@ -5,6 +5,7 @@ description: "Guide to Chart.js usage in Blowfish"
|
||||||
summary: "Blowfish includes Chart.js for powerful charts and data visualisations."
|
summary: "Blowfish includes Chart.js for powerful charts and data visualisations."
|
||||||
tags: ["chart", "sample", "graph", "shortcodes"]
|
tags: ["chart", "sample", "graph", "shortcodes"]
|
||||||
showDate: false
|
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.
|
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.
|
||||||
|
|
|
@ -4,6 +4,7 @@ date: 2019-03-06
|
||||||
description: "Guide to Mermaid usage in Blowfish"
|
description: "Guide to Mermaid usage in Blowfish"
|
||||||
summary: "It's easy to add diagrams and flowcharts to articles using Mermaid."
|
summary: "It's easy to add diagrams and flowcharts to articles using Mermaid."
|
||||||
tags: ["mermaid", "sample", "diagram", "shortcodes"]
|
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.
|
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.
|
||||||
|
|
|
@ -9,6 +9,7 @@ showViews: false
|
||||||
_build:
|
_build:
|
||||||
render: "false"
|
render: "false"
|
||||||
list: "local"
|
list: "local"
|
||||||
|
type: 'sample'
|
||||||
---
|
---
|
||||||
|
|
||||||
This page uses the `externalUrl` front matter parameter to link to an article outside of this Hugo website.
|
This page uses the `externalUrl` front matter parameter to link to an article outside of this Hugo website.
|
||||||
|
|
|
@ -6,6 +6,7 @@ draft: false
|
||||||
description: "Icon support in Blowfish."
|
description: "Icon support in Blowfish."
|
||||||
slug: "icons"
|
slug: "icons"
|
||||||
tags: ["icons", "sample", "shortcodes"]
|
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" >}}).
|
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" >}}).
|
||||||
|
|
|
@ -3,6 +3,7 @@ title: "Markdown"
|
||||||
date: 2019-03-11
|
date: 2019-03-11
|
||||||
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||||
tags: ["markdown", "css", "html", "sample"]
|
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.
|
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.
|
||||||
|
|
|
@ -3,6 +3,7 @@ title: Mathematical notation
|
||||||
date: 2019-03-08
|
date: 2019-03-08
|
||||||
description: A brief sample of mathematical notation in Blowfish.
|
description: A brief sample of mathematical notation in Blowfish.
|
||||||
tags: ["sample", "katex", "maths", "shortcodes"]
|
tags: ["sample", "katex", "maths", "shortcodes"]
|
||||||
|
type: 'sample'
|
||||||
---
|
---
|
||||||
|
|
||||||
KaTeX can be used to render mathematical notation within articles.
|
KaTeX can be used to render mathematical notation within articles.
|
||||||
|
|
|
@ -9,6 +9,7 @@ showAuthor: false
|
||||||
authors:
|
authors:
|
||||||
- "nunocoracao"
|
- "nunocoracao"
|
||||||
- "secondauthor"
|
- "secondauthor"
|
||||||
|
type: 'sample'
|
||||||
---
|
---
|
||||||
|
|
||||||
This is an example of how an article with multiple authors will look like.
|
This is an example of how an article with multiple authors will look like.
|
|
@ -7,6 +7,7 @@ description: "Lorem Ipsum Dolor Si Amet"
|
||||||
tags: ["markdown", "text", "sample", "latin"]
|
tags: ["markdown", "text", "sample", "latin"]
|
||||||
showDateUpdated: true
|
showDateUpdated: true
|
||||||
xml: false
|
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.
|
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.
|
||||||
|
|
|
@ -4,6 +4,7 @@ date: 2019-03-10
|
||||||
description: "A brief description of Hugo Shortcodes"
|
description: "A brief description of Hugo Shortcodes"
|
||||||
summary: "This is an _example_ of a **rich** content summary."
|
summary: "This is an _example_ of a **rich** content summary."
|
||||||
tags: ["shortcodes", "privacy", "sample", "gist", "twitter", "youtube", "vimeo"]
|
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.
|
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.
|
||||||
|
|
|
@ -6,6 +6,7 @@ description: "Turn on thumbnails for your articles."
|
||||||
slug: "thumbnail_sample"
|
slug: "thumbnail_sample"
|
||||||
tags: ["thumbnail", "sample"]
|
tags: ["thumbnail", "sample"]
|
||||||
summary: "A quick example of how to start using Thumbnails in your artciles."
|
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.
|
A quick example of how to start using Thumbnails in your articles.
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
{{ $limit := .Get "limit" }}
|
{{ $limit := .Get "limit" | default 1 }}
|
||||||
{{ $parent := .Page.RelPermalink }}
|
{{ $parent := .Page.RelPermalink }}
|
||||||
{{ $where := .Get "where" }}
|
{{ $where := .Get "where" }}
|
||||||
{{ $value := .Get "value" }}
|
{{ $value := .Get "value" }}
|
||||||
<h2 class="mt-20 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
|
<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">
|
<section class="space-y-10 w-full mt-10 mb-10">
|
||||||
{{ if $where }}
|
{{ if $where }}
|
||||||
{{ range ( where .Site.RegularPages $where $value | first 1 ) }}
|
{{ range ( where .Site.RegularPages $where $value | first $limit ) }}
|
||||||
{{ if not (eq .RelPermalink $parent) }}
|
{{ if not (eq .RelPermalink $parent) }}
|
||||||
{{ partial "article-link/simple.html" . }}
|
{{ partial "article-link/simple.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue