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

feat : Add Article expiration reminder support #265

Merged
merged 6 commits into from
Oct 8, 2021

Conversation

gclm
Copy link
Contributor

@gclm gclm commented Oct 6, 2021

效果如下所示:
image

@vercel
Copy link

vercel bot commented Oct 6, 2021

Someone is attempting to deploy a commit to a Personal Account owned by @HEIGE-PCloud on Vercel.

@HEIGE-PCloud first needs to authorize it.

@HEIGE-PCloud HEIGE-PCloud self-requested a review October 6, 2021 17:48
@HEIGE-PCloud
Copy link
Owner

我想做的一些改动

  • params.outdatedInfoWarning 放到 params.page.outdatedInfoWarning 下面。这将允许每个页面单独开启/关闭/配置这个警告。
  • 将 warning 放到开头,而非文章末尾。

@gclm
Copy link
Contributor Author

gclm commented Oct 7, 2021

我想做的一些改动

  • params.outdatedInfoWarning 放到 params.page.outdatedInfoWarning 下面。这将允许每个页面单独开启/关闭/配置这个警告.

这个我已经做过了。outdatedInfoWarning: false 可以添加在每篇文章的文件头里来控制是否启用该功能:

  • 将 warning 放到开头,而非文章末尾。

警告位置我已经修改过了。

- Rename outdatedInfoWarning to outdatedArticleReminder
- Rename hint to reminder
- Rename warn to warning
- Move outdatedArticleReminder from params to params.pages
- Add documentation for example config
- Add documentation for front matter
- Update translation for en and zh-CN
- clean up code for outdatedArticleReminder.html
@vercel
Copy link

vercel bot commented Oct 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pcloud/do-it/5aVhVXcH8bYEXY9VhAjqiBQBqKEV
✅ Preview: https://do-it-git-fork-gclm-dev-gclm-pcloud.vercel.app

@HEIGE-PCloud
Copy link
Owner

我做了一些 code clean up,加了一些文档。麻烦你再看一下,如果没有问题就可以合并了 👍

@gclm
Copy link
Contributor Author

gclm commented Oct 8, 2021

我已经测试过了没问题。 @HEIGE-PCloud

@HEIGE-PCloud HEIGE-PCloud merged commit 0d78207 into HEIGE-PCloud:main Oct 8, 2021
@@ -629,6 +629,16 @@ enableEmoji = true
# Page style ("normal", "wide")
# 页面样式 ("normal", "wide")
pageStyle = "wide"
# Display a message at the beginning of an article to warn the reader that its content might be outdated.
# 在文章开头显示提示信息,提醒读者文章内容可能过时。
[params.pages.outdatedArticleReminder]
Copy link
Contributor

@CXwudi CXwudi Oct 10, 2021

Choose a reason for hiding this comment

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

想问一下, key值为params.pages而不是params.page有什么原因吗?
以及要是能改进一下indentation就好了

Copy link
Owner

Choose a reason for hiding this comment

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

抱歉... 已修改...

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.

3 participants