diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index e04ea386..bef9ab2b 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1553,6 +1553,10 @@ select { margin-bottom: 2.25rem !important; } +.mt-20 { + margin-top: 5rem; +} + .-mr-2 { margin-right: -0.5rem; } diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index cf6c2c56..24e1c557 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -37,6 +37,25 @@ Don't forget to [follow me](https://twitter.com/nunocoracao) on Twitter. Don't forget to [follow me](https://twitter.com/nunocoracao) on Twitter. {{< /alert >}} +## 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. + + +|Parameter|Description| +|---|---| +|`link`| **Required.** the `.RelPermalink` to the target article.| + + +**Example:** + +```md +{{* article link="/docs/welcome/" */>}} +``` + +{{< article link="/docs/welcome/" >}} + + + ## Badge `badge` outputs a styled badge component which is useful for displaying metadata. @@ -164,6 +183,33 @@ Custom icons can be added by providing your own icon assets in the `assets/icons Icons can also be used in partials by calling the [icon partial]({{< ref "partials#icon" >}}). +## 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.| +|`where`| the number of recent articles to display.| +|`value`| the number of recent articles to display.| + + + +**Example #1:** +```md +{{* list limit=2 */>}} +``` + +{{< list limit=2 >}} + +**Example #2:** +```md +{{* list limit=2 where="Type" value="sample" */>}} +``` + +{{< list limit=2 where="Type" value="sample">}} + + ## Swatches `swatches` outputs a set of up to three different colors to showcase color elements like a color palette. This shortcode takes the `HEX` codes of each color and creates the visual elements for each. diff --git a/exampleSite/content/samples/emoji.md b/exampleSite/content/samples/emoji.md index 15f33857..2a27aa62 100755 --- a/exampleSite/content/samples/emoji.md +++ b/exampleSite/content/samples/emoji.md @@ -4,6 +4,7 @@ date: 2019-03-05 description: "Guide to Emoji usage in Blowfish" summary: "📖🏞️🧗🏽🐉🧙🏽♂️🧚🏽👸" tags: ["emoji", "sample"] +type: 'sample' --- Emoji is supported throughout Blowfish by default. Emoji can be used in titles, menu items and article content. diff --git a/layouts/partials/article-link.html b/layouts/partials/article-link.html index bf1da2c5..e6cf63ba 100644 --- a/layouts/partials/article-link.html +++ b/layouts/partials/article-link.html @@ -41,7 +41,7 @@
{{ .Title | emojify }}
+