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.10.1 to 8.11.0

scripts/events/lib/navigation.js

4

docs/ru/README.md

@@ -59,7 +59,5 @@ <div align="right">

At present, NexT encourages users to use the [Alternate Theme Config][docs-configuration-url] to configure NexT. And it's easy to customize the layout or style of NexT using [Custom Files][docs-custom-files-url].
It is not recommended to directly modify any files in the NexT theme. Because this may cause errors (e.g. merge conflicts), and the modified files may be discarded when upgrading the theme.
However, you can bypass merge conflicts (error message like **«Commit your changes or stash them before you can merge»**) by using the `Commit`, `Stash` or `Reset` commands for local changes. See [here](https://stackoverflow.com/a/15745424/5861495) how to do it.
At present, NexT encourages users to use the [Alternate Theme Config][docs-configuration-url] to configure NexT. And it's easy to customize the layout or style of NexT using [Custom Files][docs-custom-files-url].

@@ -66,0 +64,0 @@ ## Плагины

@@ -59,8 +59,6 @@ <div align="right">

我们不推荐直接修改 NexT 主题的文件。因为这可能导致错误(例如 git merge 冲突),并且在升级主题时修改的文件可能丢失。
目前 NexT 鼓励用户使用 [Alternate Theme Config][docs-configuration-url] 进行配置。并且可以轻松地通过 [Custom Files][docs-custom-files-url] 自定义主题的布局和样式。
不推荐直接修改 NexT 主题的文件。因为这可能导致错误(例如 git merge 冲突),并且在升级主题时修改的文件可能丢失。
然而你也可以通过提交(`Commit`)、贮藏(`Stash`)或忽视(`Discard`)本地更改以绕过这种更新错误(例如 **«Commit your changes or stash them before you can merge»**)。具体方法请参考[这里](https://stackoverflow.com/a/15745424/5861495)。
## 插件

@@ -67,0 +65,0 @@

{
"name": "hexo-theme-next",
"version": "8.10.1",
"version": "8.11.0",
"description": "Elegant and powerful theme for Hexo.",

@@ -37,7 +37,7 @@ "main": "package.json",

"chai": "4.3.6",
"eslint": "8.10.0",
"hexo": "6.0.0",
"eslint": "8.12.0",
"hexo": "6.1.0",
"hexo-renderer-marked": "5.0.0",
"js-yaml": "4.1.0",
"mocha": "9.2.1",
"mocha": "9.2.2",
"nyc": "15.1.0",

@@ -44,0 +44,0 @@ "stylint": "2.0.0"

@@ -59,7 +59,5 @@ <div align="right">

At present, NexT encourages users to use the [Alternate Theme Config][docs-configuration-url] to configure NexT. And it's easy to customize the layout or style of NexT using [Custom Files][docs-custom-files-url].
It is not recommended to directly modify any files in the NexT theme. Because this may cause errors (e.g. merge conflicts), and the modified files may be discarded when upgrading the theme.
However, you can bypass merge conflicts (error message like **«Commit your changes or stash them before you can merge»**) by using the `Commit`, `Stash` or `Reset` commands for local changes. See [here](https://stackoverflow.com/a/15745424/5861495) how to do it.
At present, NexT encourages users to use the [Alternate Theme Config][docs-configuration-url] to configure NexT. And it's easy to customize the layout or style of NexT using [Custom Files][docs-custom-files-url].

@@ -66,0 +64,0 @@ ## Plugins

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

require('./lib/highlight')(hexo);
// Menu and sub menu
require('./lib/navigation')(hexo);
}, 0);

@@ -16,0 +18,0 @@

@@ -78,3 +78,3 @@ 'use strict';

// Required by theme-next-docs
// Required by theme-next-docs and @next-theme/plugins
module.exports = {

@@ -81,0 +81,0 @@ resolve,

@@ -37,3 +37,3 @@ 'use strict';

}
const { name, file, unavailable } = value;
const { name, file } = value;
const links = getVendors({

@@ -46,3 +46,2 @@ ...value,

let { plugins = 'jsdelivr' } = vendors;
if (plugins === 'cdnjs' && unavailable && unavailable.includes('cdnjs')) plugins = 'jsdelivr';
if (plugins === 'local' && typeof internal === 'undefined') plugins = 'jsdelivr';

@@ -49,0 +48,0 @@ vendors[key] = {

'use strict';
function capitalize(input) {
return input.toString().charAt(0).toUpperCase() + input.toString().substr(1);
return input.toString().charAt(0).toUpperCase() + input.toString().substring(1);
}

@@ -6,0 +6,0 @@

@@ -13,3 +13,3 @@ /* global hexo */

if (theme.lazyload) {
data.content = data.content.replace(/(<img[^>]*) src=/img, '$1 data-src=');
data.content = data.content.replace(/(<img[^>]*)\ssrc=/ig, '$1 data-src=');
}

@@ -20,3 +20,3 @@ if (theme.exturl) {

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) => {
data.content = data.content.replace(/<a[^>]*\shref="([^"]+)"[^>]*>([^<]+)<\/a>/ig, (match, href, html) => {
// Exit if the href attribute doesn't exists.

@@ -23,0 +23,0 @@ if (!href) return match;

@@ -20,3 +20,6 @@ /* global hexo */

hexo.extend.helper.register('next_js', function(file, pjax = false) {
hexo.extend.helper.register('next_js', function(file, {
pjax = false,
module = false
} = {}) {
const { next_version } = this;

@@ -33,3 +36,3 @@ const { internal, custom_cdn_url } = this.theme.vendors;

const src = links[internal] || links.local;
return `<script ${pjax ? 'data-pjax ' : ''}src="${src}"></script>`;
return `<script ${pjax ? 'data-pjax ' : ''}${module ? 'type="module" ' : ''}src="${src}"></script>`;
});

@@ -36,0 +39,0 @@

@@ -124,6 +124,6 @@ /* global CONFIG */

if (tense === 'future' && prevEnd < now) {
eventList.innerHTML += '<hr>';
eventList.insertAdjacentHTML('beforeend', '<hr>');
}
eventList.innerHTML += buildEventDOM(tense, event, start, end);
eventList.insertAdjacentHTML('beforeend', buildEventDOM(tense, event, start, end));
prevEnd = end;

@@ -130,0 +130,0 @@ });

@@ -45,4 +45,4 @@ /* global instantsearch, algoliasearch, CONFIG, pjax */

const stats = CONFIG.i18n.hits_time
.replace(/\$\{hits}/, data.nbHits)
.replace(/\$\{time}/, data.processingTimeMS);
.replace('${hits}', data.nbHits)
.replace('${time}', data.processingTimeMS);
return `<span>${stats}</span>

@@ -68,3 +68,3 @@ <img src="${CONFIG.images}/logo-algolia-nebula-blue-full.svg" alt="Algolia">`;

div.innerHTML = content.value;
result += `<a href="${data.permalink}"><p class="search-result">${div.textContent.substr(0, 100)}...</p></a>`;
result += `<a href="${data.permalink}"><p class="search-result">${div.textContent.substring(0, 100)}...</p></a>`;
}

@@ -75,3 +75,3 @@ return result;

return `<div class="algolia-hits-empty">
${CONFIG.i18n.empty.replace(/\$\{query}/, data.query)}
${CONFIG.i18n.empty.replace('${query}', data.query)}
</div>`;

@@ -78,0 +78,0 @@ }

@@ -42,3 +42,3 @@ /* global CONFIG, pjax, LocalSearch */

});
const stats = CONFIG.i18n.hits.replace(/\$\{hits}/, resultItems.length);
const stats = CONFIG.i18n.hits.replace('${hits}', resultItems.length);

@@ -45,0 +45,0 @@ container.classList.remove('no-result');

@@ -32,5 +32,6 @@ /* global CONFIG, firebase */

const db = firebase.firestore();
const articles = db.collection(CONFIG.firestore.collection);
document.addEventListener('page:loaded', () => {
const db = firebase.firestore();
const articles = db.collection(CONFIG.firestore.collection);

@@ -37,0 +38,0 @@ if (CONFIG.page.isPost) {

@@ -13,3 +13,10 @@ /* global NexT, CONFIG, mermaid */

newElement.className = element.className;
element.parentNode.replaceChild(newElement, element);
const parent = element.parentNode;
// Fix issue #347
// Support mermaid inside backtick code block
if (parent.matches('pre')) {
parent.parentNode.replaceChild(newElement, parent);
} else {
parent.replaceChild(newElement, element);
}
});

@@ -16,0 +23,0 @@ mermaid.initialize({

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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