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

文章列表摘要如何自定义? #36

Closed
Jiiiiiin opened this issue Jan 28, 2018 · 5 comments
Closed

文章列表摘要如何自定义? #36

Jiiiiiin opened this issue Jan 28, 2018 · 5 comments
Labels

Comments

@Jiiiiiin
Copy link

Jiiiiiin commented Jan 28, 2018

ERROR Script load failed: scripts/main.js
ReferenceError: document is not defined
    at Object.defineProperty.value (/Users/jiiiiiin/Documents/Atom/hexo/blog/scripts/main.js:1:532)
    at t (/Users/jiiiiiin/Documents/Atom/hexo/blog/scripts/main.js:1:172)
    at Object.defineProperty.value (/Users/jiiiiiin/Documents/Atom/hexo/blog/scripts/main.js:1:294)
    at t (/Users/jiiiiiin/Documents/Atom/hexo/blog/scripts/main.js:1:172)
    at /Users/jiiiiiin/Documents/Atom/hexo/blog/scripts/main.js:1:252
    at /Users/jiiiiiin/Documents/Atom/hexo/blog/scripts/main.js:1:257
    at /Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/hexo/lib/hexo/index.js:232:12
    at tryCatcher (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:693:18)
    at Promise._fulfill (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:638:18)
    at Promise._resolveCallback (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:432:57)
    at Promise._settlePromiseFromHandler (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:524:17)
    at Promise._settlePromise (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:693:18)
    at Promise._fulfill (/Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/promise.js:638:18)
    at /Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/bluebird/js/release/nodeback.js:42:21
    at /Users/jiiiiiin/Documents/Atom/hexo/blog/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
INFO  Deploying: git
INFO  Clearing .deploy_git folder...
INFO  Copying files from public folder...
INFO  Copying files from extend dirs...
[master ad79678] Site updated: 2018-01-28 22:05:11

执行任何命令都先报这个错,但是还是可以正常执行。请问有遇到过么?

然后我还想问一下如果,文章列表不需要“摘要”能配置之后去掉么?

或者说能指定摘要内容?

@fi3ework
Copy link
Owner

  1. 报错这个没有遇到过,可能是你node或者hexo的版本过低,升级一下吧。
  2. 不显示摘要:将layout/index.ejs 中的第14行删掉重新gulp build即可
<a class="content-show-full" href = "<%- url_for(_post.path) %>" >
    <div class="abstract-content">
        <!-- <%- _content %> -->
    </div>
</a>

@Jiiiiiin
Copy link
Author

@fi3ework 好的 我试试 谢谢。 😄

@secsilm
Copy link
Contributor

secsilm commented Mar 10, 2018

@fi3ework 自定义摘要长度在哪呢,但是找不到在哪了 😄

@fi3ework
Copy link
Owner

@secsilm 在这里啊
image

@secsilm
Copy link
Contributor

secsilm commented Mar 10, 2018

@fi3ework 好的好的,我就说以前有的,粗心了

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

No branches or pull requests

3 participants