mirror of
https://github.com/imfing/hextra.git
synced 2025-06-19 10:34:15 -04:00
docs: additional shortcodes (#441)
* Create pdf.md * Update pdf.md * Escape PDF shortcode examples * Remove markdown syntax highlight * chore: update Hugo and Go versions for deployment * docs: add additional shortcodes * chore: re-compile --------- Co-authored-by: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>
This commit is contained in:
@ -54,7 +54,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: 0.121.2
|
||||
HUGO_VERSION: 0.131.0
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: '1.22'
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v4
|
||||
@ -146,7 +146,7 @@ For more details, check out:
|
||||
3. If you are not using [hextra-starter-template][hextra-starter-template], configure the following manually:
|
||||
- Configure the Build command to `hugo --gc --minify`
|
||||
- Specify the Publish directory to `public`
|
||||
- Add Environment variable `HUGO_VERSION` and set to `0.119.0`
|
||||
- Add Environment variable `HUGO_VERSION` and set to `0.132.2`
|
||||
4. Deploy!
|
||||
|
||||
Check [Hugo on Netlify](https://docs.netlify.com/integrations/frameworks/hugo/) for more details.
|
||||
|
@ -9,7 +9,6 @@ next: /docs/guide/shortcodes/callout
|
||||
|
||||
Hextra provides a collection of beautiful shortcodes to enhance your content.
|
||||
|
||||
|
||||
{{< cards >}}
|
||||
{{< card link="callout" title="Callout" icon="warning" >}}
|
||||
{{< card link="cards" title="Cards" icon="card" >}}
|
||||
@ -19,3 +18,11 @@ Hextra provides a collection of beautiful shortcodes to enhance your content.
|
||||
{{< card link="steps" title="Steps" icon="one" >}}
|
||||
{{< card link="tabs" title="Tabs" icon="collection" >}}
|
||||
{{< /cards >}}
|
||||
|
||||
<div style="padding-top:4rem"></div>
|
||||
|
||||
Additional shortcodes provided by Hugo and Hextra:
|
||||
|
||||
{{< cards >}}
|
||||
{{< card link="others" title="Others" icon="view-grid" >}}
|
||||
{{< /cards >}}
|
||||
|
43
exampleSite/content/docs/guide/shortcodes/others.md
Normal file
43
exampleSite/content/docs/guide/shortcodes/others.md
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Other Shortcodes
|
||||
linkTitle: Others
|
||||
sidebar:
|
||||
exclude: true
|
||||
---
|
||||
|
||||
{{< callout emoji="ℹ️" >}}
|
||||
Some of these are Hugo built-in shortcodes.
|
||||
These shortcodes are considered less stable and may be changed anytime.
|
||||
{{< /callout >}}
|
||||
|
||||
## YouTube
|
||||
|
||||
Embed a YouTube video.
|
||||
|
||||
```
|
||||
{{</* youtube VIDEO_ID */>}}
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
{{< youtube id=dQw4w9WgXcQ loading=lazy >}}
|
||||
|
||||
For more information, see [Hugo's YouTube Shortcode](https://gohugo.io/content-management/shortcodes/#youtube).
|
||||
|
||||
## PDF
|
||||
|
||||
With PDF shortcode, you can embed a PDF file in your content.
|
||||
|
||||
```
|
||||
{{</* pdf "https://example.com/sample.pdf" */>}}
|
||||
```
|
||||
|
||||
You can also place the PDF file in your project directory and use the relative path.
|
||||
|
||||
```
|
||||
{{</* pdf "path/to/file.pdf" */>}}
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
{{< pdf "https://upload.wikimedia.org/wikipedia/commons/1/13/Example.pdf" >}}
|
@ -27,6 +27,7 @@
|
||||
"head",
|
||||
"hr",
|
||||
"html",
|
||||
"iframe",
|
||||
"img",
|
||||
"input",
|
||||
"kbd",
|
||||
@ -221,6 +222,7 @@
|
||||
"hextra-filetree",
|
||||
"hextra-filetree-folder",
|
||||
"hextra-footer",
|
||||
"hextra-pdf",
|
||||
"hextra-scrollbar",
|
||||
"hextra-sidebar-collapsible-button",
|
||||
"hextra-tabs-panel",
|
||||
|
Reference in New Issue
Block a user