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

Support link post in more place #645

Closed
wants to merge 1 commit into from
Closed

Conversation

ImSingee
Copy link
Contributor

@ImSingee ImSingee commented Apr 28, 2023

PR Checklist

PR Type

  • Bugfix.
  • Feature.
  • Improvement.
  • Code style update (formatting, linting).
  • Refactoring (no functional changes).
  • Documentation.
  • Translation.
  • Other... Please describe:

What is the current behavior?

Some urls' wrong for the link post.

What is the new behavior?

Like https://blog.singee.me/2023/04/21/439c2231088e47d6a36502ca5427dbf1/

(See the footer for link and source code for canonical URL)

How to use?

Nothing changed, just add link: xxx to the post's front -atter.

@welcome
Copy link

welcome bot commented Apr 28, 2023

Thanks so much for opening your first PR here!

@CLAassistant
Copy link

CLAassistant commented Apr 28, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@stevenjoezhang stevenjoezhang left a comment

Choose a reason for hiding this comment

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

我不太理解为什么需要两个域名发布相同的文章。

@ImSingee
Copy link
Contributor Author

我不太理解为什么需要两个域名发布相同的文章。

@stevenjoezhang 我是在做临时的博客迁移吧

不过这个 PR 主要是因为本来 next 就在一定程度上支持了 hexo link post 只是支持的不完美,应该和具体用例无关

@stevenjoezhang
Copy link
Member

link post 怎么用其实没有很完整的描述(仅参考 https://github.com/hexojs/hexo-theme-unit-test/blob/master/source/_posts/link-post.md)
Hexo 的文档其实也没有提 Front-matter 里支持 link:https://hexo.io/zh-cn/docs/front-matter
很难说这是否属于 link post 的预期用法,但确实非常奇怪…

@ImSingee
Copy link
Contributor Author

ImSingee commented Apr 29, 2023

@stevenjoezhang 感觉这个功能就是最初想了下就没继续实现,API 文档倒是提了 link 属性,但是相关的 url_for permalink 都没提供支持,甚至 link post 也会渲染出文章来本身就很奇怪

其实看到 next 提供了 link post 支持我反而感觉挺诧异的;严格上这在一定程度上属于 undocumented 的东西

但我觉得,这种支持感觉要么不做(把首页的也去掉)、要么就做完整吧(也就是这个 PR 做的)

@stevenjoezhang
Copy link
Member

已移除对 link post 的支持 hexojs/hexo#5253

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

Successfully merging this pull request may close these issues.

3 participants