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

hexo-theme-next

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-theme-next - npm Package Compare versions

Comparing version 8.2.1 to 8.2.2-beta.0

9

package.json
{
"name": "hexo-theme-next",
"version": "8.2.1",
"version": "8.2.2-beta.0",
"description": "Elegant and powerful theme for Hexo.",

@@ -17,2 +17,3 @@ "main": "package.json",

"eslint": "eslint scripts/ source/js test/",
"prepare": "git config --local core.hooksPath .githooks/",
"stylint": "stylint source/css/",

@@ -39,12 +40,6 @@ "test": "mocha test/index.js"

"hexo-renderer-marked": "3.3.0",
"husky": "4.3.8",
"js-yaml": "4.0.0",
"mocha": "8.2.1",
"stylint": "2.0.0"
},
"husky": {
"hooks": {
"pre-commit": "npm run eslint && npm test"
}
}
}

@@ -16,2 +16,4 @@ /* global hexo */

const siteHost = parse(config.url).hostname || config.url;
// External URL icon
const exturlIcon = theme.exturl_icon ? '<i class="fa fa-external-link-alt"></i>' : '';
data.content = data.content.replace(/<a[^>]* href="([^"]+)"[^>]*>([^<]+)<\/a>/img, (match, href, html) => {

@@ -25,3 +27,7 @@ // Exit if the href attribute doesn't exists.

return `<span class="exturl" data-url="${Buffer.from(href).toString('base64')}">${html}<i class="fa fa-external-link-alt"></i></span>`;
// Return encrypted URL with title.
const title = match.match(/title="([^"]+)"/);
if (title) return `<span class="exturl" data-url="${Buffer.from(href).toString('base64')}" title="${title[1]}">${html}${exturlIcon}</span>`;
return `<span class="exturl" data-url="${Buffer.from(href).toString('base64')}">${html}${exturlIcon}</span>`;
});

@@ -28,0 +34,0 @@ }

@@ -21,7 +21,8 @@ /* global hexo */

const { internal } = this.theme.vendors;
const minified_file = file.endsWith('.js') && !file.endsWith('.min.js') ? file.slice(0, -3) + '.min.js' : file;
const links = {
local : this.url_for(`${this.theme.js}/${file}`),
jsdelivr: `https://cdn.jsdelivr.net/npm/hexo-theme-next@${next_version}/source/js/${file}`,
jsdelivr: `https://cdn.jsdelivr.net/npm/hexo-theme-next@${next_version}/source/js/${minified_file}`,
unpkg : `https://unpkg.com/hexo-theme-next@${next_version}/source/js/${file}`,
cdnjs : `https://cdnjs.cloudflare.com/ajax/libs/hexo-theme-next/${next_version}/${file}`
cdnjs : `https://cdnjs.cloudflare.com/ajax/libs/hexo-theme-next/${next_version}/${minified_file}`
};

@@ -28,0 +29,0 @@ const src = links[internal] || links.local;

Sorry, the diff of this file is not supported yet

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