Skip to content

Commit

Permalink
Merge pull request tangly1024#3141 from zzzhizhia/feat/beianLink
Browse files Browse the repository at this point in the history
feat: 添加备案查询链接配置
  • Loading branch information
tangly1024 authored Jan 15, 2025
2 parents 30d8e76 + 2f3efad commit ce44bd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions blog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const BLOG = {
KEYWORDS: process.env.NEXT_PUBLIC_KEYWORD || 'Notion, 博客', // 网站关键词 英文逗号隔开
BLOG_FAVICON: process.env.NEXT_PUBLIC_FAVICON || '/favicon.ico', // blog favicon 配置, 默认使用 /public/favicon.ico,支持在线图片,如 https://img.imesong.com/favicon.png
BEI_AN: process.env.NEXT_PUBLIC_BEI_AN || '', // 备案号 闽ICP备XXXXXX
BEI_AN_LINK: process.env.NEXT_PUBLIC_BEI_AN_LINK || 'https://beian.miit.gov.cn/', // 备案查询链接,如果用了萌备等备案请在这里填写

// RSS订阅
ENABLE_RSS: process.env.NEXT_PUBLIC_ENABLE_RSS || true, // 是否开启RSS订阅功能
Expand Down
5 changes: 3 additions & 2 deletions components/BeiAnSite.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import { siteConfig } from '@/lib/config'
*/
export default function BeiAnSite() {
const beian = siteConfig('BEI_AN')
const beianLink = siteConfig('BEI_AN_LINK')
if (!beian) {
return null
}
return (
<span>
<i className='fas fa-shield-alt' />
<a href='https://beian.miit.gov.cn/' className='mx-1'>
{siteConfig('BEI_AN')}
<a href={beianLink} className='mx-1'>
{beian}
</a>
<br />
</span>
Expand Down

0 comments on commit ce44bd2

Please sign in to comment.