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

split social links config from Header #96

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pnpm dev
- favicon
- robots.txt -> update the Sitemap url to your own domain
- open-graph -> the open-graph is the image that will be displayed when sharing the blog link. For posts, the preview image is the post cover.
- Edit the social networks in the Header component - **src/components/Header.astro**, change the URL to your social network.
- Edit the social networks in **src/data/links.ts**, change the URL to your social network.

## 🗂️ Adding a category

Expand Down
18 changes: 1 addition & 17 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
---
import HeaderLink from '@/components/HeaderLink'
import TwitterIcon from '@/components/icons/TwitterIcon'
import GithubIcon from '@/components/icons/GithubIcon'
import MenuIcon from './icons/MenuIcon.astro'
import Search from '@/components/Search'
import TagIcon from './icons/TagIcon.astro'
import ToggleTheme from './ToggleTheme.astro'

// ADD YOUR SOCIAL NETWORKS HERE
const SOCIALNETWORKS = [
{
name: 'Github',
url: 'https://github.com/danielcgilibert/blog-template',
icon: GithubIcon
},

{
name: 'Twitter',
url: 'https://github.com/danielcgilibert/blog-template',
icon: TwitterIcon
}
]
import { SOCIALNETWORKS } from '@/data/links'
---

<header class='relative flex items-center h-12 font-semibold'>
Expand Down
17 changes: 17 additions & 0 deletions src/data/links.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import TwitterIcon from '@/components/icons/TwitterIcon'
import GithubIcon from '@/components/icons/GithubIcon'

// ADD YOUR SOCIAL NETWORKS HERE
export const SOCIALNETWORKS = [
{
name: 'Github',
url: 'https://github.com/danielcgilibert/blog-template',
icon: GithubIcon
},

{
name: 'Twitter',
url: 'https://github.com/danielcgilibert/blog-template',
icon: TwitterIcon
}
] as const