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

add wechat subscriber #788

Merged
merged 1 commit into from Apr 3, 2016
Merged

add wechat subscriber #788

merged 1 commit into from Apr 3, 2016

Conversation

huiwang
Copy link
Contributor

@huiwang huiwang commented Apr 2, 2016

在每一篇文章结尾处添加微信公众号二维码,扫一扫,订阅博客

@huiwang
Copy link
Contributor Author

huiwang commented Apr 2, 2016

@huiwang huiwang mentioned this pull request Apr 2, 2016
@huiwang
Copy link
Contributor Author

huiwang commented Apr 3, 2016

@iissnan 麻烦您看一下,能不能接受这个PR,谢谢。

@flashlab
Copy link
Contributor

flashlab commented Apr 3, 2016

我觉得加配置还是慎重点好,整个模板已经很庞杂了,没解决的和没发现的bug越来越多,如果确实需要可以再开一些分支,把这些小的附加功能归类到一起。纯属个人意见 :)

@huiwang
Copy link
Contributor Author

huiwang commented Apr 3, 2016

@flashlab 谢谢您的意见。我觉得您的担忧是对的,新的功能确实增加系统的规模。大规模的系统的维护通常是趋于复杂的。

不知道你有没有看这个PR里改变的文件的细节。这个新功能是独立的,封装好的,它的增加会使系统更加庞大,但并不会使它变得更加复杂。

另外,您说的这些话让我想到,我们是不是应该写一个程序员贡献手册,来规范今后新的开发。

@flashlab
Copy link
Contributor

flashlab commented Apr 3, 2016

恩,Next拓展性很好,所以这个改动应该不会有什么副作用,但是维护不只局限于代码,文档,demo,复杂环境的兼容性等等都是需要耗费精力的。针对你这个pr,如果改动config文件,有可能其他人在pull的时候会和自己修改的版本冲突。至于手册我觉得不必,contribution就是要五花八门才好

@huiwang
Copy link
Contributor Author

huiwang commented Apr 3, 2016

@flashlab, 同意,代码只是一部分,很多时候是最简单的一部分,如果大家接受这个PR的话,我会把接下的工作一并做好。

至于你所提到的冲突的问题,我想是有可能的,毕竟只有一个config文件。解析这个冲突应该会很快,因为它是独立的。根据我个人经验,避免冲突的最有效的方式,就是连续的作小的整合,不要积攒了很多之后再merge。

最后,能不能被接受,当然还是看commiter的想法,看大家的需求。我只是觉得,我做的这个小功能,别人可能会有同样的需求,所以就分享出来了,避免重复性工作。

@iissnan
Copy link
Owner

iissnan commented Apr 3, 2016

@huiwang Thanks 👍 。

我合并到 v5.0.1 分支中,master 分支目前 freeze for v5.0.0。

@iissnan iissnan added this to the v5.0.1 milestone Apr 3, 2016
@iissnan iissnan added the Docs label Apr 3, 2016
@huiwang
Copy link
Contributor Author

huiwang commented Apr 3, 2016

谢谢 @iissnan , 我可以帮着把doc也填上,不知道doc在哪里改?

@iissnan
Copy link
Owner

iissnan commented Apr 3, 2016

@huiwang Docs 的源码在这里 https://github.com/iissnan/theme-next-docs

@iissnan iissnan merged commit b3fa964 into iissnan:master Apr 3, 2016
@@ -0,0 +1,6 @@
{% if theme.wechat_subscriber.enabled %}
<div id="wechat_subscriber" style="display: block; padding: 10px 0; margin: 20px auto; width: 100%; text-align: center">
<img id="wechat_subscriber_qcode" src="{{ theme.wechat_subscriber.qcode }}" alt="{{ theme.author }} wechat" style="width: 200px; max-width: 100%;"/>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方使用 url_for 会比较好点。

src="{{ theme.wechat_subscriber.qcode }} -> src="{{ url_for(theme.wechat_subscriber.qcode) }}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next6.0版本的配置和官网上的已经不一样了,两种版本的加入方式我都试过了,都不成功,会是哪里出了问题?

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

Successfully merging this pull request may close these issues.

None yet

4 participants