Skip to content

Commit 547f66a

Browse files
committed
refactor: adjust site config
1 parent 678bd5d commit 547f66a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/components/AppHeader.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Icon from './Icon.astro'
88
export interface Props extends HTMLAttributes<'svg'> {}
99
1010
const { ...props } = Astro.props
11-
const { title, description, authorAvatar } = siteConfig
11+
const { title, description, author } = siteConfig
1212
---
1313

1414
<div class="header-container">
@@ -22,7 +22,7 @@ const { title, description, authorAvatar } = siteConfig
2222
<div class="header-logo mr-3">
2323
<a href="/">
2424
<img
25-
src={authorAvatar}
25+
src={author.avatar}
2626
alt="Author's avatar"
2727
class="rounded-full"
2828
style="margin-bottom: 0 !important;"

src/configs/site.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ const env = process.env
33
export default {
44
title: 'LeetCode Blog',
55
description: 'Solutions for LeetCode problems - Written by ansidev',
6-
author: 'ansidev',
7-
authorAvatar: '/ansidev.png',
6+
author: {
7+
name: 'Le Minh Tri',
8+
avatar: '/ansidev.png',
9+
},
810
favicon: '/favicon.ico',
911
faviconMimeType: 'image/x-icon',
1012
plugins: {

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { title, description, author } = siteConfig
99
<AppLayout
1010
title={title}
1111
description={description}
12-
author={author}
12+
author={author.name}
1313
headerCssClasses="max-w-xl px-8"
1414
>
1515
<main class="mx-auto my-4 p-4 max-w-2xl text-site-header-text">

0 commit comments

Comments
 (0)