Kagome

🏠 HOME 🗂️ POSTS 😈 ABOUT 🔗 LINK
https://cloud.miiiku.xyz/src/images/cover/cover-11.jpg?x-oss-process=style/webp

播放音频与视频,shortcode使用说明

2021-05-26 11:32

  • doc
  • test
  • hugo
  • video
  • music

Hugo ships with several Built-in Shortcodes for rich content, along with a Privacy Config and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.

Hugo默认支付播放YouTube,Vimeo等视频格式,所有支持的类型见: Hugo/templates/shortcodes

使用方式见官方文档: shortcode-templates

如添加一个YouTube视频:

YouTube Privacy Enhanced Shortcode

<!-- 实际写的时候 '['替换为 '{' ']'替换为'}' -->
[[< youtube hDy9BrB9_VU >]]

除了官方已有的shortcode模版,kagome目前有两个自定义的shortcode,分别是aplayer和dplayer,如下:

aplayer文档地址

dplayer文档地址

aPlayer Shortcode

如果需要使用aplayer需要在Front Matter中添加aplayer: true

<!-- 实际写的时候 '['替换为 '{' ']'替换为'}' -->
[[< aplayer
    url="https://qiniu.sukoshi.xyz/public/music/鹿乃 - アイロニ.mp3"
    name="アイロニ"
    artist="鹿乃"
    cover="https://qiniu.sukoshi.xyz/public/music/鹿乃 - アイロニ.jpg"
    lrc="https://qiniu.sukoshi.xyz/public/music/鹿乃 - アイロニ.lrc"
    lrcType="3"
>]]

dPlayer Shortcode

如果需要使用dplayer需要在Front Matter中添加dplayer: true

<!-- 实际写的时候 '['替换为 '{' ']'替换为'}' -->
[[< dplayer
    url="https://qiniu.sukoshi.xyz/video/%E7%BE%8E.mp4"
    pic="https://qiniu.sukoshi.xyz/video/%E7%BE%8E.mp4?vframe/jpg/offset/10"
>]]

config.toml配置

2021-06-09 11:32

插入公式,图片与Widget目录显示

2021-05-25 16:59

Sukoshi

Sukoshi

梅花鹿的角叫鹿角

Related Posts

  • 如何丰富Banner信息
  • i18n多语言配置
  • Front Matter 相关参数说明
  • config.toml配置
  • 插入公式,图片与Widget目录显示

Categories

  • doc 6
  • syntax 1
  • test 1
  • themes 1

Tags

hugo markdown config css emoji html i18n image math music privacy shortcodes
show all

© 2021 Sukoshi.

Powered by Hugo Theme - kagome

🌞 light 🌛 dark 🤖️ auto