Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: additional shortcodes #441

Merged
merged 8 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/css/compiled/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
! tailwindcss v3.4.9 | MIT License | https://tailwindcss.com
! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
Expand Down
6 changes: 3 additions & 3 deletions exampleSite/content/docs/guide/deploy-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down
9 changes: 8 additions & 1 deletion exampleSite/content/docs/guide/shortcodes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" >}}
Expand All @@ -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 changes: 43 additions & 0 deletions exampleSite/content/docs/guide/shortcodes/others.md
Original file line number Diff line number Diff line change
@@ -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" >}}
2 changes: 2 additions & 0 deletions exampleSite/hugo_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"head",
"hr",
"html",
"iframe",
"img",
"input",
"kbd",
Expand Down Expand Up @@ -221,6 +222,7 @@
"hextra-filetree",
"hextra-filetree-folder",
"hextra-footer",
"hextra-pdf",
"hextra-scrollbar",
"hextra-sidebar-collapsible-button",
"hextra-tabs-panel",
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.