Skip to content

Commit

Permalink
Merge commit '27589ab7d17c1502b6118639b25392f35222436c'
Browse files Browse the repository at this point in the history
  • Loading branch information
imguoguo committed Nov 19, 2023
2 parents a010c49 + 27589ab commit fb1734d
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 43 deletions.
18 changes: 9 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ assignees: tangly1024
-->

**描述bug**
简单说明bug的现象、相关的错误提示、日志等
【此项必填】简单说明bug的现象、相关的错误提示、日志等

**复现步骤**
出现这个bug的操作步骤
【此项必填】出现这个bug的操作步骤

**期望的正常结果**
希望按这个步骤,正常操作结果是什么
【此项必填】希望按这个步骤,正常操作结果是什么

**截图**
相关的页面,应该的结果
【可选】相关的页面,应该的结果

**环境**

- 操作系统: [例如. iOS, Android, macOS, windows]
- 浏览器 [例如. chrome, safari, firefox]
- NotionNext版本 [e.g. 3.13.6]
- 主题 [例如. hexo]
- 【必填】NotionNext版本 [例如. 4.0.18]
- 【必填】主题 [例如. hexo]
- 【可选】操作系统: [例如. iOS, Android, macOS, windows]
- 【可选】浏览器 [例如. chrome, safari, firefox]

**补充说明**
与问题相关的其它说明
【可选】与问题相关的其它说明
22 changes: 12 additions & 10 deletions components/QrCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ export default function QrCode({ value }) {
return
}
loadExternalResource(qrCodeCDN, 'js').then(url => {
const QRCode = window.QRCode
qrcode = new QRCode(document.getElementById('qrcode'), {
text: value,
width: 256,
height: 256,
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H
})
// console.log('二维码', qrcode, value)
const QRCode = window?.QRCode
if (typeof QRCode !== 'undefined') {
qrcode = new QRCode(document.getElementById('qrcode'), {
text: value,
width: 256,
height: 256,
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H
})
// console.log('二维码', qrcode, value)
}
})
return () => {
if (qrcode) {
Expand Down
17 changes: 10 additions & 7 deletions components/Twikoo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ const Twikoo = ({ isDarkMode }) => {

const lang = siteConfig('LANG')
useEffect(() => {
window?.twikoo?.init({
envId: envId, // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app)
el: el, // 容器元素
lang: lang // 用于手动设定评论区语言,支持的语言列表 https://github.com/imaegoo/twikoo/blob/main/src/client/utils/i18n/index.js
// region: 'ap-guangzhou', // 环境地域,默认为 ap-shanghai,腾讯云环境填 ap-shanghai 或 ap-guangzhou;Vercel 环境不填
// path: location.pathname, // 用于区分不同文章的自定义 js 路径,如果您的文章路径不是 location.pathname,需传此参数
})
const twikoo = window?.twikoo
if (typeof twikoo !== 'undefined' && twikoo && typeof twikoo.init === 'function') {
twikoo.init({
envId: envId, // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app)
el: el, // 容器元素
lang: lang // 用于手动设定评论区语言,支持的语言列表 https://github.com/imaegoo/twikoo/blob/main/src/client/utils/i18n/index.js
// region: 'ap-guangzhou', // 环境地域,默认为 ap-shanghai,腾讯云环境填 ap-shanghai 或 ap-guangzhou;Vercel 环境不填
// path: location.pathname, // 用于区分不同文章的自定义 js 路径,如果您的文章路径不是 location.pathname,需传此参数
})
}
}, [isDarkMode])
return (
<div id="twikoo"></div>
Expand Down
2 changes: 1 addition & 1 deletion pages/archive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const ArchiveIndex = props => {

const meta = {
title: `${locale.NAV.ARCHIVE} | ${siteConfig('TITLE')}`,
description: siteConfig('HOME_BANNER_IMAGE'),
description: siteConfig('DESCRIPTION'),
image: siteInfo?.pageCover,
slug: 'archive',
type: 'website'
Expand Down
2 changes: 1 addition & 1 deletion pages/category/[category]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function Category(props) {
title: `${props.category} | ${locale.COMMON.CATEGORY} | ${
siteConfig('TITLE') || ''
}`,
description: siteConfig('HOME_BANNER_IMAGE'),
description: siteConfig('DESCRIPTION'),
slug: 'category/' + props.category,
image: siteInfo?.pageCover,
type: 'website'
Expand Down
2 changes: 1 addition & 1 deletion pages/category/[category]/page/[page].js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function Category(props) {
title: `${props.category} | ${locale.COMMON.CATEGORY} | ${
siteConfig('TITLE') || ''
}`,
description: siteConfig('HOME_BANNER_IMAGE'),
description: siteConfig('DESCRIPTION'),
slug: 'category/' + props.category,
image: siteInfo?.pageCover,
type: 'website'
Expand Down
2 changes: 1 addition & 1 deletion pages/category/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function Category(props) {

const meta = {
title: `${locale.COMMON.CATEGORY} | ${siteConfig('TITLE')}`,
description: siteConfig('HOME_BANNER_IMAGE'),
description: siteConfig('DESCRIPTION'),
image: siteInfo?.pageCover,
slug: 'category',
type: 'website'
Expand Down
2 changes: 1 addition & 1 deletion pages/page/[page].js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Page = props => {

const meta = {
title: `${props?.page} | Page | ${siteConfig('TITLE')}`,
description: siteConfig('HOME_BANNER_IMAGE'),
description: siteConfig('DESCRIPTION'),
image: siteInfo?.pageCover,
slug: 'page/' + props.page,
type: 'website'
Expand Down
2 changes: 1 addition & 1 deletion pages/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Search = props => {

const meta = {
title: `${keyword || ''}${keyword ? ' | ' : ''}${locale.NAV.SEARCH} | ${siteConfig('TITLE')}`,
description: siteConfig('HOME_BANNER_IMAGE'),
description: siteConfig('DESCRIPTION'),
image: siteInfo?.pageCover,
slug: 'search',
type: 'website'
Expand Down
2 changes: 1 addition & 1 deletion pages/tag/[tag]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Tag = props => {

const meta = {
title: `${tag} | ${locale.COMMON.TAGS} | ${siteConfig('TITLE')}`,
description: siteConfig('HOME_BANNER_IMAGE'),
description: siteConfig('DESCRIPTION'),
image: siteInfo?.pageCover,
slug: 'tag/' + tag,
type: 'website'
Expand Down
2 changes: 1 addition & 1 deletion pages/tag/[tag]/page/[page].js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Tag = props => {

const meta = {
title: `${tag} | ${locale.COMMON.TAGS} | ${siteConfig('TITLE')}`,
description: siteConfig('HOME_BANNER_IMAGE'),
description: siteConfig('DESCRIPTION'),
image: siteInfo?.pageCover,
slug: 'tag/' + tag,
type: 'website'
Expand Down
2 changes: 1 addition & 1 deletion pages/tag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const TagIndex = props => {

const meta = {
title: `${locale.COMMON.TAGS} | ${siteConfig('TITLE')}`,
description: siteConfig('HOME_BANNER_IMAGE'),
description: siteConfig('DESCRIPTION'),
image: siteInfo?.pageCover,
slug: 'tag',
type: 'website'
Expand Down
2 changes: 1 addition & 1 deletion themes/matery/components/SideBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const SideBar = (props) => {
<div className='mx-5 pt-6 pb-2'>
<LazyImage src={siteInfo?.icon} className='cursor-pointer rounded-full' width={80} alt={siteConfig('AUTHOR')} />
<div className='text-white text-xl my-1'>{siteConfig('TITLE')}</div>
<div className='text-xs my-1 text-gray-300'>{siteConfig('HOME_BANNER_IMAGE')}</div>
<div className='text-xs my-1 text-gray-300'>{siteConfig('DESCRIPTION')}</div>
</div>
</div>
<MenuListSide {...props} />
Expand Down
2 changes: 1 addition & 1 deletion themes/nobelium/components/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const Nav = props => {
: (
<p className="ml-2 font-medium text-gray-800 dark:text-gray-300 header-name whitespace-nowrap">
{siteConfig('TITLE')}
{/* ,{' '}<span className="font-normal">{siteConfig('HOME_BANNER_IMAGE')}</span> */}
{/* ,{' '}<span className="font-normal">{siteConfig('DESCRIPTION')}</span> */}
</p>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion themes/nobelium/components/Title.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { siteConfig } from '@/lib/config'
*/
export const Title = (props) => {
const { post } = props
const title = post?.title || siteConfig('HOME_BANNER_IMAGE')
const title = post?.title || siteConfig('DESCRIPTION')
const description = post?.description || siteConfig('AUTHOR')

return <div className="text-center px-6 py-12 mb-6 bg-gray-100 dark:bg-hexo-black-gray dark:border-hexo-black-gray border-b">
Expand Down
4 changes: 2 additions & 2 deletions themes/plog/components/LogoBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export default function LogoBar(props) {
)
: (
<p className="ml-2 font-medium text-gray-800 dark:text-gray-300 header-name">
<Link href="/" aria-label={siteConfig('title')}> {siteConfig('TITLE')}</Link>
{' '}<span className="font-normal text-sm text-gray-00 dark:text-gray-400">{siteConfig('HOME_BANNER_IMAGE')}</span>
<Link href="/" aria-label={siteConfig('TITLE')}> {siteConfig('TITLE')}</Link>
{' '}<span className="font-normal text-sm text-gray-00 dark:text-gray-400">{siteConfig('DESCRIPTION')}</span>
</p>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion themes/plog/components/Title.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { siteConfig } from '@/lib/config'
*/
export const Title = (props) => {
const { post } = props
const title = post?.title || siteConfig('HOME_BANNER_IMAGE')
const title = post?.title || siteConfig('DESCRIPTION')
const description = post?.description || siteConfig('AUTHOR')

return <div className="text-center px-6 py-12 mb-6 bg-gray-100 dark:bg-hexo-black-gray dark:border-hexo-black-gray border-b">
Expand Down
2 changes: 1 addition & 1 deletion themes/simple/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const Header = (props) => {
<div className='flex justify-center'>
<SocialButton />
</div>
<div className='text-xs mt-4 text-gray-500 dark:text-gray-300'>{siteConfig('HOME_BANNER_IMAGE')}</div>
<div className='text-xs mt-4 text-gray-500 dark:text-gray-300'>{siteConfig('DESCRIPTION')}</div>
</div>
</header>
)
Expand Down
2 changes: 1 addition & 1 deletion themes/simple/components/Title.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { siteConfig } from '@/lib/config'
*/
export const Title = (props) => {
const { post } = props
const title = post?.title || siteConfig('HOME_BANNER_IMAGE')
const title = post?.title || siteConfig('DESCRIPTION')
const description = post?.description || siteConfig('AUTHOR')

return <div className="text-center px-6 py-12 mb-6 bg-gray-100 dark:bg-hexo-black-gray dark:border-hexo-black-gray border-b">
Expand Down

0 comments on commit fb1734d

Please sign in to comment.