mythsman / hexo-douban Goto Github PK
View Code? Open in Web Editor NEW:cd: a Hexo plugin that helps you generate content for Douban books, movies, music, and games.
License: MIT License
:cd: a Hexo plugin that helps you generate content for Douban books, movies, music, and games.
License: MIT License
Yikun的读书页面 的 封面和字体都要比你的大一些,看起来更加符合这个hexo主题,博主可以修改一下页面布局吗..
在indigo主题下生成的页面图片会发生错位现象,而且一定几率Promise会报错。
书和电影都有了,三件套是不是只还差音乐了。
up,这个音乐专辑功能感觉可以有。
1.0.7版本,执行hexo douban的时候能看到提示抓取到了数据,但是静态化和部署之后页面只有标题,没有其他任何内容,请问是什么情况。
在使用hexo douban生成文件时,出现错误。
以下是命令行输出的信息:
INFO Start processing
INFO 5 books have been loaded in 754 ms
INFO 45 movies have been loaded in 4327 ms
INFO 0 games have been loaded in 2127 ms
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\common\utils.js [ 45.85% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\common\animation.js [ 64.76% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\common\pack.js [ 51.37% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\layout\loading.js [ 32.61% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\layout\back-top.js [ 55.25% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\layout\header.js [ 44.95% saved]
INFO hexo-filter-cleanup(JS): S:\i.t\blog\yooceii.github.io\themes\hexo-theme-skapp\source\js\layout\post.js [ 48.44% saved]
INFO hexo-filter-cleanup(USEREF): js/common.js
INFO hexo-filter-cleanup(HTML): 2018/06/05/hello-world/index.html [ 33.62% saved]
INFO hexo-filter-cleanup(HTML): books/index.html [ 31.97% saved]
INFO hexo-filter-cleanup(HTML): movies/index.html [ 23.17% saved]
INFO hexo-filter-cleanup(HTML): games/index.html [ 35.02% saved]
INFO hexo-filter-cleanup(HTML): archives/index.html [ 41.51% saved]
INFO hexo-filter-cleanup(HTML): archives/2018/index.html [ 41.49% saved]
INFO hexo-filter-cleanup(HTML): archives/2018/06/index.html [ 41.59% saved]
INFO hexo-filter-cleanup(HTML): index.html [ 40.59% saved]
Unhandled rejection TypeError: self.route.get(...)._data is not a function
at names.forEach.name (S:\i.t\blog\yooceii.github.io\node_modules\hexo-douban\index.js:83:48)
at Array.forEach ()
at S:\i.t\blog\yooceii.github.io\node_modules\hexo-douban\index.js:81:11
at tryCatcher (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (S:\i.t\blog\yooceii.github.io\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
用的是hexo主题,不是显示问题,而是只有书爬不到。。。然后用了作者的user信息去爬,结果如上也是爬不到。。
最近发现读书模块生成的页面中,书籍封面无法正常加载,建议作者关注下这个问题。
如下是我配置:
douban:
user: 51517255
builtin: true
movie:
title: '观影'
quote: <div class="note success no-icon"><p>You got a dream, you gotta protect it. People can't do something themselves, they wanna tell you you can't do it.If you want something, go get it. --《当幸福来敲门》</p></div>
为了修改 quote 的默认效果,我用如上方式写的,但是显示的效果不符合预期:
我观察博主的显示效果是这样的,比较符合预期:
INFO Start processing
INFO 3683 movies have been loaded in 356577 ms
INFO Generated: movies/index.html
整整6分钟,我以为没反应了,第一次直接跳出了
输入hexo g、hexo d、hexo、hexo s --debug时,均出现报错:
Error: connect ECONNREFUSED 127.0.0.1:80 (req "error"), GET http:///people/173149290/collect?start=15&sort=time&rating=all&filter=all&mode=grid -1 (connected: false, keepalive socket: false)
movies-generator.js里面将
var watchedUrl = 'https://movie.douban.com/people/' + config.douban.user + '/collect';
注释,或者https换http,hexo可以发布,只是get不到豆瓣信息。
如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。
如何解决microsoft edge和safari不显示图片bug?
请问可以增加两个功能吗,修改_config.yml便实现:
1.修改默认显示的标签页(如默认显示正在读的书,而非读过的书)。
2.另一个是修改自定义分页的条数(比如20条电影信息分页,而非10条)。
您做的非常好,非常感谢您!
my blog is saving at subdirectory '/Blog'
So when I click movie link, the URL would be 'name.github.io/movie', but actually, the URL should be 'name.github.io/Blog/movie'. How to fix this error?
(When I change the config to moive: /Blog/movie, that would only work successfully once, at the next time will be /Blog/Blog/moive)
我的豆瓣显示电影是116部
但是抓到的只有61部?
您好,我Buildin设定为True了之后,生成页面任然未能嵌入hexo g
和hexo s
,确定为最新版本。
好像没有做分页处理,我看了一下你的代码好像是一次遍历所以的数据然后进行静态渲染的,
do {
res = callApi(config.douban.user, start);
wish = wish.concat(res.wish);
reading = reading.concat(res.reading);
read = read.concat(res.read);
start = res.start + res.count;
} while ( start < res . total );
但是这样的话,如果数据请求过大,或者过多的化,感觉很容易出现下面这种情况
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: spawnSync C:\Program Files\nodejs\node.exe ETIMEDOUT
at exports._errnoException (util.js:1018:11)
at Object.spawnSync (child_process.js:459:20)
at request (D:\blog\hexo\node_modules\urllib-sync\index.js:33:16)
at callApi (D:\blog\hexo\node_modules\hexo-douban\lib\books-generator.js:25:13)
at Hexo.module.exports (D:\blog\hexo\node_modules\hexo-douban\lib\books-generator.js:74:11)
就是说好像是因为等待返回数据同步的问题,这个在网络不好的环境下,generated成功的概率有点低。
我感觉可以用js前端动态渲染的方式进行,就是去douban拿数据来渲染页面的方式,不知道可不可行
之前提过的一个 issue,在 hexo-douban 没有与 hexo s
解耦的时候,在网络不好的情况下,会导致 hexo s
执行起来卡在爬取的阶段,现在解耦命令了,感觉那个特性可以去除掉了,因为在网络不好的情况下,由于这个特性,会需要多次执行 hexo douban
才能正常生成页面。。
我想页面修改 在哪里改?
如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。
貌似兼容性的问题,安卓里面OK。
你好,这款插件确实做得很好,但是用在项目中的时候我发现两个小问题,就是豆瓣书籍部分只能显示在读,要是我点击已读或者想读,电影部分也是这样子,只能显示默认的不能进行切换,请问后面还会再优化吗
page
以前有的,现在怎么回事呢?
书籍页面有缩略图
现在使用的是1.0.5版本,部署成功。但很奇怪生成的豆瓣读书页面,电脑端显示正常,而手机端图片不能加载。书单页面
每次hexo s都会不停的对豆瓣接口进行请求,这就导致在断网或是网络环境不好的情况下运行hexo s会报错。
INFO Start processing
INFO 105 books have been loaded in 2144 ms
INFO 0 movies have been loaded in 887 ms
INFO 0 games have been loaded in 920 ms
INFO ---- START COPYING TAG CLOUD FILES ----
INFO ---- END COPYING TAG CLOUD FILES ----
INFO Generated: books/index.html
INFO Generated: movies/index.html
INFO Generated: games/index.html
在安装插件以后,执行hexo g命令生成页面时报错,根据错误信息推断是Promise报错,请问在这种情况下我应该怎么做呢?
你好~~~我按照所有设置配了,但发布之后,进去一直提示404,cannot get books,请问是哪里出了问题呢?
不能实时更新啊
INFO Start processing
INFO 40 books have been loaded in 1058 ms
INFO Generated: books/index.html
<main>
</main>
"hexo-douban": "^1.0.8"
重装无法解决
INFO 130 books have been loaded in 3649 ms
INFO 0 movies have been loaded in 974 ms
已经更新到 1.0.2 版本。
Hexo NexT主题(最新版本 Hexo 和最新版本 NexT)开启 busuanzi 后,生成的豆瓣读书、电影等页面不能加载 busuanzi,Chrome 提示:
Failed to load resource: the server responded with a status of 400 (Bad Request)
http://busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback_213324422534
而且导致生成的豆瓣读书、电影等页面的页脚中由 busuanz 统计的总访客数、总访问量无法显示。
如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。
以及确定是最新版。
blockquote 标签被识别成 引号。
分页当前只有一个显示了分页。
如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。
设置了builtin参数为true,
hexo g 后,虽然会显示 XX movies have been loaded in xx ms
但是不会生成 movies/index.html
试了好多次都一样,打开Movies 显示不存在。最终还是靠hexo douban来解决
如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。
建议去掉 douban-loading.gif 要么放进npm 要么就去掉 不然界面会报错
如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。
我觉得既然可以加 quote,那就应该可以选择添加 quote 的 cite 引用来源。
例如:
仓促本身就是最要不得的态度。当你做某件事的时候,一旦想要求快,就表示你再也不关心它,而想去做别的事。
罗伯特 · M · 波西格 《禅与摩托车维修艺术》
myblog\node_modules\hexo-douban\lib\templates\book.ejs
<blockquote>
<p><%- quote; %></p>
<cite><%- quoteAuthor; %></cite>
</blockquote>
能加多个引用来源的支持就更好了
因为插件目前好像只抓豆瓣的短评,而自己有时候会为书写读后感(书评),因此在书的页面下能否为一些书添加读后感(书评)的链接。
我觉得简单点的做法就是:在豆瓣某本书上评论里放读后感的链接,然后插件生成页面的时候能正则判断下,给链接加个 标签。
或者可以配置文件中加配置这种方式:
bookid: 1234567
link: 'http://example.com'
buildIn 没效果,hexo g
会检查配置是否合法,但是不会重新生成新的 HTML 文件。
不知道作者对这样的新功能请求有什么看法😂
使用该主题,打算把豆瓣的页面放到侧边栏,hexo douban
的时候,显示
Unhandled rejection TypeError:
和Cannot read property 'format' of undefined
,节选报错如下图
报错太长,我也看不懂,希望开发者能尝试解决一下,谢谢
您好 我想请问一下 博客中添加的hexo-douban这个插件,在本地调试是没问题的 hexo clean hexo g hexo d 之后就404了
我的插件装好之后,hexo douban b 生成的books是在站点目录下的public中 (每次hexo clean之后这个目录好像都会被删掉) 请问你们是如何处理这个问题的????
在网页端显示没有问题,包括用chrome的视图适配到移动端尺寸也ok,比如下图
但是如果直接从手机上打开网址会发现图片显示不出来,点击会有fancybox的报错信息,比如下两图:
也比较好奇这种情况我应该怎么测试,会不会和fancybox相关,我尝试disable掉这个插件在_config.xml
里fancybox:false
,这个时候整个豆瓣读书都section都不会显示,但travis ci里没有报错。
博客主题 next-mist,
node版本 7,
博客连接 www.chocoluffy.com/books/
谢谢分享,很棒的插件!
如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。
Mac和手机下单referrerpolicy不生效
Chrome正常
如果你在使用中发现了问题,首先请确保你使用的版本是最新的版本,最新的更新记录可以从这里查看。
node v6.6.0
hexo-douban v1.1.0
hexo v3.7.1 v3.8.0
查看是这里报错,if(cookie.length==0){
我把 cookie 的声明放在函数内就不报错了。但无法抓取到任何书或者电影。
应该是最近的更新导致的,之前在 v1.0.5 是 ok 的。
I install this plugin in your method.
But when I visit http://localhost:4000/books,I find that my terminal show me a warning which said "WARN No layout: books/index.html"
How can I solve this problem?
Maybe I should develop this page by myself?
感谢owner主如此棒的插件~
有个小建议 不知道好不好实现
0.2.13已对网络环境不好的情况下进行了优化 能不能在hexo -s的时候加入一个参数使其不加载douban插件,这样就不会每次修改一些配置或者post的时候都重新获取一次豆瓣数据了(每次获取的时候都会卡一段时间 这段时间localhost:4000是不能访问的)。
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.