Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义样式 _custom.styl 怎么没了 #982

Closed
eonun opened this issue Jul 18, 2019 · 13 comments
Closed

自定义样式 _custom.styl 怎么没了 #982

eonun opened this issue Jul 18, 2019 · 13 comments

Comments

@eonun
Copy link

eonun commented Jul 18, 2019

themes/source/css/_custom/custom.styl怎么没了

@welcome
Copy link

welcome bot commented Jul 18, 2019

Thanks for opening this issue, maintainers will get back to you as soon as possible!

@Raincal
Copy link
Member

Raincal commented Jul 18, 2019

换位置了 #973 (comment)

@eonun
Copy link
Author

eonun commented Jul 18, 2019

建议在说明文档内添加一个变更说明,不然升级变更了都无从下手了,谢谢

@Raincal
Copy link
Member

Raincal commented Jul 18, 2019

这个 Breaking Change 会放在 v7.3.0 的 release 说明中,升级的话建议使用 tag 分支

@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented Jul 18, 2019

建议在说明文档内添加一个变更说明,不然升级变更了都无从下手了,谢谢

https://github.com/theme-next/hexo-theme-next/releases
https://theme-next.org/

GitHub
Elegant and powerful theme for Hexo. Contribute to theme-next/hexo-theme-next development by creating an account on GitHub.
NexT

@aixiu
Copy link

aixiu commented Jul 19, 2019

当启用自定义底部文件时,复制是了一份文件到source/_data/footer.swig 并用_config.ymlfooter: source/_data/footer.swig的时候,hexo g 卡住,并不能生成静态文件!
@stevenjoezhang

@stevenjoezhang
Copy link
Contributor

@aixiu 有报错信息吗

@support
Copy link

support bot commented Jul 30, 2019

👋 @eonun, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.

@aixiu
Copy link

aixiu commented Aug 4, 2019

@stevenjoezhang

这是配置文件,我就是把主题下的footer.swig复制了一份到source/_data/footer.swig,想自定义最下边的,并启用配置文件就这样

custom_file_path:
  #head: source/_data/head.swig
  #header: source/_data/header.swig
  #sidebar: source/_data/sidebar.swig
  #postMeta: source/_data/post-meta.swig
  #postBodyEnd: source/_data/post-body-end.swig
  footer: source/_data/footer.swig
  #bodyEnd: source/_data/body-end.swig
  #variable: source/_data/variables.styl
  #mixin: source/_data/mixins.styl
  style: source/_data/styles.styl

这是报错信息 hexo g ,这个过程要等很长时间
等了差不多10多分种,出错记录很长,只记录最开始的一部分,和最后一部分

INFO  Start processing
INFO  Files loaded in 2.04 s
ERROR Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at new Moment (E:\My_blog\node_modules\moment\moment.js:237:9)
    at createFromConfig (E:\My_blog\node_modules\moment\moment.js:2544:19)
    at createLocalOrUTC (E:\My_blog\node_modules\moment\moment.js:2631:16)
    at createLocal (E:\My_blog\node_modules\moment\moment.js:2635:16)
    at hooks (E:\My_blog\node_modules\moment\moment.js:12:29)
    at getMoment (E:\My_blog\node_modules\hexo\lib\plugins\helper\date.js:9:31)
    at Object.dateHelper (E:\My_blog\node_modules\hexo\lib\plugins\helper\date.js:31:18)
    at Object.eval [as tpl] (eval at precompile (E:\My_blog\node_modules\swig-templates\lib\swig.js:537:13), <anonymous>:6:111)
    at compiled (E:\My_blog\node_modules\swig-templates\lib\swig.js:664:18)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (E:\My_blog\node_modules\hexo\lib\theme\view.js:121:22)
    at Theme._View.View.View.renderSync (E:\My_blog\node_modules\hexo\lib\theme\view.js:49:23)
    at Object.partial (E:\My_blog\node_modules\hexo\lib\plugins\helper\partial.js:38:15)
    at eval (eval at precompile (E:\My_blog\node_modules\swig-templates\lib\swig.js:537:13), <anonymous>:90:119)
    at Object.exports.each (E:\My_blog\node_modules\swig-templates\lib\utils.js:45:11)
    at eval (eval at precompile (E:\My_blog\node_modules\swig-templates\lib\swig.js:537:13), <anonymous>:83:10)
    at Object.eval [as tpl] (eval at precompile (E:\My_blog\node_modules\swig-templates\lib\swig.js:537:13), <anonymous>:98:3)
    at compiled (E:\My_blog\node_modules\swig-templates\lib\swig.js:664:18)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (E:\My_blog\node_modules\hexo\lib\theme\view.js:121:22)
    at Theme._View.View.View.renderSync (E:\My_blog\node_modules\hexo\lib\theme\view.js:49:23)
    at Object.partial (E:\My_blog\node_modules\hexo\lib\plugins\helper\partial.js:38:15)
    at eval (eval at precompile (E:\My_blog\node_modules\swig-templates\lib\swig.js:537:13), <anonymous>:90:119)
    at Object.exports.each (E:\My_blog\node_modules\swig-templates\lib\utils.js:45:11)
ERROR Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at Function.[Symbol.hasInstance] (<anonymous>)
    at isMoment (E:\My_blog\node_modules\moment\moment.js:252:20)
    at prepareConfig (E:\My_blog\node_modules\moment\moment.js:2568:13)
    at createFromConfig (E:\My_blog\node_modules\moment\moment.js:2544:44)
    at createLocalOrUTC (E:\My_blog\node_modules\moment\moment.js:2631:16)
    at createLocal (E:\My_blog\node_modules\moment\moment.js:2635:16)
    at hooks (E:\My_blog\node_modules\moment\moment.js:12:29)
    at getMoment (E:\My_blog\node_modules\hexo\lib\plugins\helper\date.js:9:31)
    at Object.dateHelper (E:\My_blog\node_modules\hexo\lib\plugins\helper\date.js:31:18)

......

    at Object.partial (E:\My_blog\node_modules\hexo\lib\plugins\helper\partial.js:38:15)
INFO  See you again
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: Client network socket disconnected before secure TLS connection was established
    at TLSSocket.onConnectEnd (_tls_wrap.js:1088:19)
    at Object.onceWrapper (events.js:277:13)
    at TLSSocket.emit (events.js:194:15)
    at endReadableNT (_stream_readable.js:1125:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at TLSSocket.socketErrorListener (_http_client.js:392:9)
    at TLSSocket.emit (events.js:189:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

hexo 版本

$ hexo --version
hexo: 3.8.0
hexo-cli: 2.0.0
os: Windows_NT 6.1.7601 win32 x64
http_parser: 2.8.0
node: 10.15.3
v8: 6.8.275.32-node.51
uv: 1.23.2
zlib: 1.2.11
ares: 1.15.0
modules: 64
nghttp2: 1.34.0
napi: 3
openssl: 1.1.0j
icu: 62.1
unicode: 11.0
cldr: 33.1
tz: 2018e
$ node -v
v10.15.3

@jiangtj
Copy link
Member

jiangtj commented Aug 4, 2019

@aixiu
image
custom_file_path 通过 injects 添加自定义文件,你复制整个 footer.swig 的时候,把注入点也复制了,所以这里死循环了
在自定义footer.swig中去掉上图中红框框内的代码

@stevenjoezhang
Copy link
Contributor

是的,其实只用把之前在_config.yml中设置的footer.custom_text的内容放到source/_data/footer.swig里面就行了。

@aixiu
Copy link

aixiu commented Aug 4, 2019

@stevenjoezhang @jiangtj 谢谢两位!~!

@stevenjoezhang stevenjoezhang reopened this Oct 8, 2019
@support support bot removed the Support label Oct 8, 2019
@stevenjoezhang stevenjoezhang pinned this issue Oct 8, 2019
@stevenjoezhang stevenjoezhang changed the title 自定义样式怎么没了 自定义样式 _custom.styl 怎么没了 Oct 8, 2019
@stevenjoezhang stevenjoezhang unpinned this issue Oct 16, 2019
@stevenjoezhang
Copy link
Contributor

@eonun @aixiu 更新说明加到这里了,欢迎关注:https://github.com/theme-next/hexo-theme-next/issues/1217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants