Xin 66d2bf57ba
Some checks failed
Deploy Hugo site to Pages / build (push) Has been cancelled
Deploy Hugo site to Pages / deploy (push) Has been cancelled
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>
2024-08-18 16:34:48 +01:00

833 B
Raw Blame History

title linkTitle sidebar
Other Shortcodes Others
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.

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" >}}