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

关于文章ID的一些问题和建议 #1595

Closed
tangkunyin opened this issue Nov 18, 2015 · 4 comments
Closed

关于文章ID的一些问题和建议 #1595

tangkunyin opened this issue Nov 18, 2015 · 4 comments

Comments

@tangkunyin
Copy link

这个post id每次重新生成文章时(hexo g)都会变化。引发的问题是如果用这个id作为第三方平台的唯一标识,那就会出问题。比如我用搜狐畅言做评论,这篇文章id变动后,评论就没了。你可以想一下,如果用户将此网页收藏了,但是重新生成后,链接就变了,用户保存的收藏就没了。
建议此处的id用时间戳表示。发布时的时间是可控的,等有时间我会考虑优化这块,不知大家怎么想....

@Xuanwo
Copy link
Contributor

Xuanwo commented Nov 18, 2015

所以不要用post id,我记得第三方平台本身就可以用时间戳作为参数

@tangkunyin
Copy link
Author

对。最后我还是通过自定义模板解决这个了。如果内置上时间戳属性,就完美了

@Xuanwo
Copy link
Contributor

Xuanwo commented Nov 19, 2015

恩?时间戳不是自己给的么?post本身就是时间这个属性的~

@zhaoyao91
Copy link

还是建议提供一个简单易用的固定id功能。非常重要。

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

No branches or pull requests

3 participants