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: 添加备案查询链接配置 #3141

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

zzzhizhia
Copy link
Contributor

feat: 添加备案查询链接配置

已知问题

  1. 备案查询链接在代码里写死,如果使用萌备等非官方备案则更改挂载链接很麻烦

解决方案

  1. 添加环境变量 NEXT_PUBLIC_BEI_AN_LINK
    • 默认值是 https://beian.miit.gov.cn/
    • 可更改为萌备如 https://icp.gov.moe/?keyword=<keyword>

改动收益

  1. 能够通过环境变量直接修改备案查询链接
    • 增加对萌备圈的亲和力

具体改动

  1. components/BeiAnSite.js
    • const beianLink = siteConfig('BEI_AN_LINK')
    • <a href={beianLink} className='mx-1'> {beian} </a>

测试确认

  • [√] 本地开发环境测试通过
  • [√] 生产环境构建测试通过
  • [√] 环境变量配置正常工作
  • [√] 挂载链接配置正常生效

feat: 更新备案查询链接配置说明

feat: 更新备案链接文本为动态配置
Copy link

vercel bot commented Jan 9, 2025

@zzzhizhia is attempting to deploy a commit to the tangly1024's projects Team on Vercel.

A member of the Team first needs to authorize it.

@zzzhizhia
Copy link
Contributor Author

示例:https://drim.cc

Copy link
Owner

@tangly1024 tangly1024 left a comment

Choose a reason for hiding this comment

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

感谢提交!

@tangly1024 tangly1024 merged commit ce44bd2 into tangly1024:main Jan 15, 2025
0 of 3 checks passed
hermitong added a commit to hermitong/NotionNext that referenced this pull request Jan 19, 2025
…ink"

This reverts commit ce44bd2, reversing
changes made to 30d8e76.
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.

2 participants