diff --git a/exampleSite/content/posts/advanced/includes.md b/exampleSite/content/posts/advanced/includes.md index ddb0b55..1be4d38 100644 --- a/exampleSite/content/posts/advanced/includes.md +++ b/exampleSite/content/posts/advanced/includes.md @@ -20,18 +20,18 @@ Include shortcode can include files of different types. By specifying a language ``` -Attributes: +## Attributes -| Name | Usage | default | +| Name | Description | default | | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | | file | path to the included file relative to the Hugo root | undefined | | language | language for [syntax highlighting](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages) | undefined | | type | special include type (`html,page`) | undefined (rendered as markdown) | | options | highlighting [options](https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode) | `linenos=table` | -## Examples +## Usage -### Markdown file (default) +## Markdown file (default) If no other options are specified, files will be rendered as Markdown using the `RenderString` [function](https://gohugo.io/functions/renderstring/). @@ -51,7 +51,7 @@ If you include markdown files that should not get a menu entry, place them outsi -### Language files +## Language files This method can be used to include source code files and keep them automatically up to date. @@ -68,9 +68,9 @@ Result: -### Special include types +## Special include types -#### HTML +### HTML HTML content will be filtered by the `safeHTML` filter and added to the rendered page output. @@ -81,7 +81,7 @@ HTML content will be filtered by the `safeHTML` filter and added to the rendered {{< include file="/static/_includes/example.html.part" type="html" >}} -#### Pages +### Pages In some situations, it can be helpful to include Markdown files that also contain shortcodes. While the [default method](#markdown-file-default) works fine to render plain Markdown, shortcodes are not parsed. The only way to get this to work is to use Hugo pages. There are several ways to structure these include pages, so whatever you do, keep in mind that Hugo needs to be able to render and serve these files as regular pages! How it works: diff --git a/exampleSite/content/posts/advanced/shortcodes.md b/exampleSite/content/posts/advanced/shortcodes.md index fb205ce..76181bf 100644 --- a/exampleSite/content/posts/advanced/shortcodes.md +++ b/exampleSite/content/posts/advanced/shortcodes.md @@ -36,9 +36,17 @@ Buttons are styled links that can lead to local page or external link. The Columns shortcode can be used to organize content side-by-side (horizontally) for better readability. +### Attributes + +| Name | Description | default | +| --------------- | ------------------------------------------------ | ------- | +| size (optional) | size of the first column (small\|regular\|large) | regular | + +### Usage + ```html -{{}} +{{}} # Left Content Dolor sit, sumo unique argument um no ... @@ -160,19 +168,19 @@ copious quo ad. Stet probates in duo. Hint shortcode can be used as hint/alerts/notification block. -Attributes: +### Attributes -| Name | Usage | default | -| ---------------- | --------------------------------------------------------------------------------------- | --------------------- | -| type | color types to choose from | note | -| icon (optional) | custom icon to use | undefined (type name) | -| title (optional) | custom icon to use, need to be an icon from an [SVG sprite](/posts/features/icon-sets/) | undefined (type name) | +| Name | Description | default | +| ---------------- | -------------------------------------------------------------------------------------- | --------- | +| type | hint type | note | +| icon (optional) | custom icon to use,need to be an icon from an [SVG sprite](/posts/features/icon-sets/) | undefined | +| title (optional) | hint title | undefined | -Syntax: +### Usage ```tpl -{{}} +{{}} **Markdown content**\ Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. @@ -307,7 +315,7 @@ prompts feud gait, quid exercise emeritus bis e. In pro quints consequent. ```tpl -{{}} +{{}} sequenceDiagram Alice->>Bob: Hello Bob, how are you? alt is sick diff --git a/exampleSite/content/posts/post-with-images/index.md b/exampleSite/content/posts/post-with-images/index.md index 51d080b..00728b3 100644 --- a/exampleSite/content/posts/post-with-images/index.md +++ b/exampleSite/content/posts/post-with-images/index.md @@ -53,16 +53,16 @@ If you need more flexibility for your embedded images, you could use the `img` s -**Attributes:** +## Attributes -| Name | Usage | default | -| ------------- | -------------------------------------------------------------------------------------------------------------- | ----------------- | -| name (string) | Name of the image resource defined in your front matter. | empty | -| alt (string) | Description for displayed image. | resource `.Title` | -| size (string) | Thumbnail size (tiny\|small\|medium\|large). | empty | -| lazy (bool) | Enable or disable image lazy loading. Can be controlled globally by site parameter `geekblogImageLazyLoading`. | true | +| Name | Description | default | +| ---- | -------------------------------------------------------------------------------------------------------------- | ----------------- | +| name | Name of the image resource defined in your front matter. | empty | +| alt | Description for displayed image. | resource `.Title` | +| size | Thumbnail size (profile\|tiny\|small\|medium\|large). | empty | +| lazy | Enable or disable image lazy loading. Can be controlled globally by site parameter `geekblogImageLazyLoading`. | true | -**Example:** +## Usage Define your resources in the page front matter, custom parameter `params.credits` is optional. @@ -83,7 +83,7 @@ resources: -**Demo:** +## Example