Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hexo-codepen-snippet

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-codepen-snippet

### 使用

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

hexo-codepen-snippet

使用

基本使用

在md文件中插入代码

{% codepen [配置名1]:[值1] [配置名2]:[值2] %}

// eg
{% codepen slug_hash:xxxx theme_id:js %}

所有配置项

配置名
src_prefix具体见codepen
slug_hash具体见codepen
default_tab具体见codepen
theme_id具体见codepen
stylehtml内联css样式
scrolling见iframe标签属性
frameborder见iframe标签属性
loading见iframe标签属性
allowtransparency见iframe标签属性
allowfullscreen见iframe标签属性

配置种类

优先级:引用配置 > hexo博客全局配置 > 插件内部默认配置

高优先级的配置会覆盖掉底优先级的配置

引用配置

在md文件中插入代码中配置

    {% codepen [配置名1]:[值1] [配置名2]:[值2] %}
hexo博客全局配置

在博客_config.yml文件中配置

    # codepen
    codepen:
    src_prefix: 'https://codepen.io/misakisaysyes/embed'
    default_tab: js
    theme_id: light
插件内部默认配置

这是根据作者使用习惯内置在插件中的配置

具体配置情况如下:

    // 内置默认配置
    const default_config = {
        style: 'height: 256px; width: 100%;',
        scrolling: 'no',
        frameborder: 'no',
        loading: 'lazy',
        allowtransparency: 'true',
        allowfullscreen: 'true'
    }

Keywords

FAQs

Package last updated on 08 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc