跳至主要內容

哔哩哔哩动画

MonoLogueChi小于 1 分钟

介绍

可以插入 bilibili 视频

使用

{% mmedia "bilibili" "bvid:BV1br4y1P7ND" %}
{% mmedia "bilibili" "bvid:BV1br4y1P7ND" "danmaku:false" %}

参数

  • 使用 := 分割。

详细参数表:

参数默认解释
aid-aid
bvid-bvid,与 aid 同时出现时以 bvid 为准
page1page
danmakutrue是否有弹幕 ture or false
allowfullscreenallowfullscreen允许全屏, allowfullscreen 或 true 允许,其他选项不允许
sandbox配置iframe sandbox
width100%css 属性
max_width850pxcss 属性
marginautocss 属性

JSON 参数

mmedia 插件允许在 contents 部分使用 JSON 编写配置,使用 JSON5 标准。

配置

默认配置可写入 _config.yml

mmedia:
  bilibili:
    default:
      page: 1
      danmaku: true
      allowfullscreen: allowfullscreen
      sandbox: allow-top-navigation allow-same-origin allow-forms allow-scripts allow-popups
      width: 100%
      max_width: 850px
      margin: auto