A collection of Inferno.js layout components and utility scripts for Hexo
$ npm install hexo-component-inferno --save
Please refer to this page.
Please refer to tests in the src
directory or take a look at hexo-theme-icarus.
A collection of Inferno.js layout components and utility scripts for Hexo
Home Page: https://ppoffice.github.io/hexo-component-inferno/
$ npm install hexo-component-inferno --save
Please refer to this page.
Please refer to tests in the src
directory or take a look at hexo-theme-icarus.
Related PR: #39
it seems that version 1.6.2 used in gitalk.jsx
will cause Error: Request failed with status code 403
when initiating comment in new articles. Gitalk changed its proxy config in latest version so change to 1.7.2 can solve the bug
Refer to gitalk/gitalk#426
The following code:
hexo-component-inferno/src/hexo/tag/tabs.js
Lines 240 to 246 in 944db58
treats any location.hash
as part of an menu. However, in practice, location.hash
may point to other elements in the page.
This causes my page to error at the line:
Array.from($tabMenuContainer.children).forEach($menu => $menu.classList.remove('is-active'));
because the classList
attribute is not available.
I think there should be a check that location.hash
really points to something in a tab menu.
hexo-component-inferno/src/view/plugin/katex.jsx
Lines 59 to 62 in a8ffee2
Changelog: https://github.com/KaTeX/KaTeX/releases
Feature added: \relax
, \nonumber
and \notag
were implemented.
Would you mind making a new release? The npm package hasn't been updated for 5 months. The katex
plugin was still v0.11.1 and every new feature since then like align
environment was not available.
https://github.com/ppoffice/hexo-component-inferno/blob/master/src/hexo/helper/cdn.js#L132-L139
this.config
取的是 hexo 的配置文件,而不是主题的配置文件。导致只取到默认值 google。
{
"name": "hexo-site",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "hexo generate",
"clean": "hexo clean",
"deploy": "hexo deploy",
"server": "hexo server"
},
"hexo": {
"version": "4.2.0"
},
"dependencies": {
"bulma-stylus": "0.8.0",
"hexo": "^4.2.0",
"hexo-abbrlink": "^2.0.5",
"hexo-component-inferno": "^0.2.0",
"hexo-filter-mathjax": "^0.4.1",
"hexo-filter-nofollow": "^2.0.2",
"hexo-generator-archive": "^1.0.0",
"hexo-generator-category": "^1.0.0",
"hexo-generator-feed": "^2.2.0",
"hexo-generator-index": "^1.0.0",
"hexo-generator-seo-friendly-sitemap": "^0.0.25",
"hexo-generator-tag": "^1.0.0",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-inferno": "^0.1.3",
"hexo-renderer-markdown-it": "^4.1.0",
"hexo-renderer-stylus": "^1.1.0",
"hexo-server": "^1.0.0",
"inferno": "^7.3.3",
"inferno-create-element": "^7.3.3"
},
"devDependencies": {
"hexo-browsersync": "^0.3.0"
}
}
Cusdis is a lightweight, privacy-friendly alternative to Disqus.
https://github.com/djyde/cusdis
Title.
Link: https://artalk.js.org/
Based on docs found here: https://ppoffice.github.io/hexo-component-inferno/module-view_widget_links-Links.html
Using the following YAML in _config.icarus.yml
links:
Link Name 1: /path/to/external/site
Link Name 2:
link: /path/to/external/site
hide_hostname: true
The first link renders correctly.
The second link displays the name, and hides the space for the hostname, but does not render the hostname within the link so there is no link.
obviously the adjacent three-level subtitle is not rendered. seems the toc.jsx not process the four-level subtitles. it should either be rendered just as other subtitles, or completely ignored.
characters like /
are htmlentitied when rendering toc
eg: file://
rendered as file://
Related PR: #44
currently the toc generated for post will show all subtitles at once. for many long articles, this will leads to a full-page catalogue with many lines wrapped:
it wastes space while affecting user experience, for some substitles may be hidden forever provided the toc is still sticked. one decent solution is to make the toc stacked by default, but expended when the subtitle enters viewport:
two popular hexo themes already bundled with such function AFAIK, related code is at here and here. I'm still investigating how to integrate such feature into icarus, hope the solution will be found out soon.
Waline is a safer inspired by Valine with self hoted backend support, I tried to deploy with docker and use mysql as it's database and found that it's easier to deploy than isso. Then I tried to add this feature to inferno by myself but I was not very familiar with js and failed. So I sincerely hope can get your help.
There are some links maybe helpful:
Waline Github
Waline HomePage
Thanks.
a/index.html
和a/
会被是为不同的网页,其评论不通用。虽然可以通过设置waline的path来解决(如下)
Waline({
path: location.pathname.endsWith('/index.html')?location.pathname.substring(0,(location.pathname.lastIndexOf('/')+1)):location.pathname
})
但是 hexo-component-inferno 并没有提供设置 path 的接口,希望能提供一个设置path的接口。(虽然现在直接改js也能用
相关issue: ppoffice/hexo-theme-icarus#1021, walinejs/waline#748
官网:umami.is
Is it posible to move widget adsense from hexo-component-inferno to local theme forlder? I mean in this folder "/hexo/themes/icarus/layout/widget/"
现在的toc三级以后的无法展开了...最好是能够看到所有层级,哪怕规定最多6级也可以。
还有就是能否加一个默认toc展开的选项,这样看起来会方便些。
Lightgallery has the option to disable the download icon when viewing photos from the gallery but I can seem to find it.
Can anyone point me to the right direction? Thanks
因为我想改些代码,所以先 fork 这个仓库,然后在我的博客 icarus 主题下安装我 fork 的这个仓库,执行 hexo g
报错 Error: EISDIR: illegal operation on a directory, read
。
# gan @ ganzhixiongdeMac-Studio in ~/Documents/blog/themes/icarus on git:master x [13:14:32]
$ npm install --save ganzhixiong/hexo-component-inferno
changed 1 package in 43s
75 packages are looking for funding
run `npm fund` for details
hexo g
和 hexo s
。# gan @ ganzhixiongdeMac-Studio in ~/Documents/blog on git:master x [13:19:26]
$ hexo g
INFO Validating config
ERROR {
err: [Error: EISDIR: illegal operation on a directory, read] {
errno: -21,
code: 'EISDIR',
syscall: 'read'
}
} Plugin load failed: %s hexo-component-inferno
Inferno is in development mode.
INFO =======================================
██╗ ██████╗ █████╗ ██████╗ ██╗ ██╗███████╗
██║██╔════╝██╔══██╗██╔══██╗██║ ██║██╔════╝
██║██║ ███████║██████╔╝██║ ██║███████╗
██║██║ ██╔══██║██╔══██╗██║ ██║╚════██║
██║╚██████╗██║ ██║██║ ██║╚██████╔╝███████║
╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝
=============================================
INFO === Checking package dependencies ===
ERROR Package hexo-component-inferno is not installed.
ERROR Please install the missing dependencies your Hexo site root directory:
ERROR npm install --save hexo-component-inferno@github:ganzhixiong/hexo-component-inferno
ERROR or:
ERROR yarn add hexo-component-inferno@github:ganzhixiong/hexo-component-inferno
# gan @ ganzhixiongdeMac-Studio in ~/Documents/blog on git:master x [13:19:32] C:255
$ hexo s
INFO Validating config
Inferno is in development mode.
ERROR {
err: [Error: EISDIR: illegal operation on a directory, read] {
errno: -21,
code: 'EISDIR',
syscall: 'read'
}
} Plugin load failed: %s hexo-component-inferno
INFO =======================================
██╗ ██████╗ █████╗ ██████╗ ██╗ ██╗███████╗
██║██╔════╝██╔══██╗██╔══██╗██║ ██║██╔════╝
██║██║ ███████║██████╔╝██║ ██║███████╗
██║██║ ██╔══██║██╔══██╗██║ ██║╚════██║
██║╚██████╗██║ ██║██║ ██║╚██████╔╝███████║
╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝
=============================================
INFO === Checking package dependencies ===
ERROR Package hexo-component-inferno is not installed.
ERROR Please install the missing dependencies your Hexo site root directory:
ERROR npm install --save hexo-component-inferno@github:ganzhixiong/hexo-component-inferno
ERROR or:
ERROR yarn add hexo-component-inferno@github:ganzhixiong/hexo-component-inferno
我参考Profile写了一个实现,使用的时候总是报错,能否说一下扩展widget的方法?
here is https://cdnjs.com/libraries/waline
hexo-component-inferno/src/hexo/helper/cdn.js
Lines 69 to 70 in df60da7
目前我是在 themes/icarus/source/css/ 目录下创建一个 gitalk.css 文件,然后修改 gitalk.js 中的 cssUrl 的值为 /css/gitalk.css
,来实现的。但是这样得修改依赖包。
还有没有其他不修改依赖包的方法。
I have a post with the following headings (there is no h3):
h2
h2
h2
h4
h4
h4
h4
h2
And I used the toc widget with depth=3
.
I printed tocObj
from
[
{ text: 'Registration', id: 'Registration', level: 2 },
{
text: 'Pay for what you use',
id: 'Pay-for-what-you-use',
level: 2
},
{ text: 'Global states', id: 'Global-states', level: 2 },
{ text: 'Name conflicts', id: 'Name-conflicts', level: 4 },
{ text: 'Overwrites', id: 'Overwrites', level: 4 },
{
text: 'Pickle & multiprocessing',
id: 'Pickle-multiprocessing',
level: 4
},
{ text: 'Obscure Provenance', id: 'Obscure-Provenance', level: 4 },
{
text: 'Alternative: just use full qualname',
id: 'Alternative-just-use-full-qualname',
level: 2
}
]
However, when I print the return value of the getToc
function, it's:
{
'1': { id: 'Registration', text: 'Registration', index: '1' },
'2': {
id: 'Pay-for-what-you-use',
text: 'Pay for what you use',
index: '2'
},
'3': {
'1': {
id: 'Obscure-Provenance',
text: 'Obscure Provenance',
index: '3.1'
},
id: 'Global-states',
text: 'Global states',
index: '3'
},
'4': {
id: 'Alternative-just-use-full-qualname',
text: 'Alternative: just use full qualname',
index: '4'
}
}
So among the 4 h4
s, only one is kept.
I don't know what the intended behavior is (keep all h4? keep no h4? throw an error?), but the current behavior is probably not intended.
The problem is that when the viewport is scrolled into the three-level subtitles, the whole toc is stacked abruptly. Notably, this bug only happens in the first sequence of three-level subtitles but works fine at the second occurance of three-level subtitle. IMHO this is because the first and second three-level subtitles is directly under the first-level subtitle, namely there's a "gap" between its direct upper level and itself (1 down to 3, 2 is missed). when such gap perceived, the expected behavior, arguably, is to persist the visibility of the toc.
Waline已经更新到2.6.3了,而这里仍然一直使用旧版1.5.4的js,为什么不改成用最新版?
Currently the links widget defaultly show all hostname. despite the situation where the description is long, and the item will wrap, causing very uncomforable looking, e.g.
and it's better to automatically discard the hostname part if there's no enough space. this could be archive by reimplement the structure in hexo-component-inferno → lib → view → widget → link.js → Links → <function> → value
, using a grid system or whatnot.
currently I'm using hand-written and hard-coded length-of-string schema, kinda like this:
let item = [(0, _inferno.createVNode)(1, "span", "level-left", (0, _inferno.createVNode)(1, "span", "level-item", i, 0), 2)];
if (hostname.length <= 15)
item.push((0, _inferno.createVNode)(1, "span", "level-right", (0, _inferno.createVNode)(1, "span", "level-item tag", hostname, 0), 2));
return (0, _inferno.createVNode)(1, "li", null, (0, _inferno.createVNode)(1, "a", "level is-mobile", item, ...
Considering the fact that this is a relatively very small, simple but great improvement, it'll be better if this small improvement could be merged into mainstream, and released ASAP.
已经更新到2.14.1了
(没有办法自动使用最新版的js吗..?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.