New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hexo-theme-shokax

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-theme-shokax - npm Package Compare versions

Comparing version 0.0.1-alpha5 to 0.0.1-alpha6

scripts/plugin/lib/injects-point.js

2

package.json
{
"name": "hexo-theme-shokax",
"version": "0.0.1-alpha5",
"version": "0.0.1-alpha6",
"description": "a hexo theme based on shoka",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -20,4 +20,3 @@ # hexo-theme-shokaX

- [x] 部分功能调整为可关闭
- [ ] 重构lib方法(长期计划)
- [ ] 异步化js
- [ ] 插件系统

@@ -39,3 +38,4 @@ ## 和shoka的区别

# 许可证
许可证: MIT \
许可证: BSD-3-Clause \
请注意: `0.0.1-alpha6`版本开始,shokaX使用BSD协议,这意味着删除页脚处的shokaX标识是违反许可证的
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fzkz098%2Fhexo-theme-shokaX.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fzkz098%2Fhexo-theme-shokaX?ref=badge_large)

@@ -42,0 +42,0 @@

/* global hexo */
'use strict'
/** @type {Map<string, string[]>} */
const insertions = new Map()
class TemplateBlock {
constructor (text, type = 'raw') {
this.text = text
this.type = type
this.result = ''
}
render () {
if (this.type === 'raw' || this.type === 'html') {
this.result = this.text
}
this.result = hexo.render.renderSync({ text: this.text, engine: this.type })
}
repalceTag (...tag) {
tag.forEach((item) => {
this.text = this.text.replace(item.tag, item.value)
})
}
insert (location) {
if (insertions.get(location)) {
insertions.get(location).push(this.result)
} else {
insertions.set(location, [])
}
}
}
const toolpack = {
TemplateBlock
}
hexo.extend.helper.register('insert_footer', () => {
if (hexo.theme.config?.plugin?.enable && insertions.get('footer')) {
let res = ''
insertions.get('footer').forEach((item) => {
res += item
})
return res
}
})
if (hexo.theme.config?.plugin?.enable) {
hexo.theme.config.plugin.load.forEach((item) => {
const p = require(item)
console.log(p)
if (p.prepare) {
p.prepare(hexo, this)
}
p.main(hexo, this, toolpack)
})
}
// hexo.on('generateBefore', () => {
// // 加载`theme_injects`过滤器
// require('./lib/injects')(hexo);
// });

Sorry, the diff of this file is not supported yet

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