|
9 | 9 | ArrowsOutSimple, |
10 | 10 | ClipboardTextIcon, |
11 | 11 | } from '@phosphor-icons/react'; |
12 | | -import Seo from '../components/Seo'; |
| 12 | +import useSeo from '../hooks/useSeo'; |
13 | 13 | import { useAchievements } from '../context/AchievementContext'; |
14 | 14 | import MarkdownLink from '../components/MarkdownLink'; |
15 | 15 | import CodeModal from '../components/CodeModal'; |
@@ -99,6 +99,27 @@ const TerminalBlogPostPage = () => { |
99 | 99 | const [modalLanguage, setModalLanguage] = useState('jsx'); |
100 | 100 | const [modalImageSrc, setModalImageSrc] = useState(null); |
101 | 101 |
|
| 102 | + useSeo({ |
| 103 | + title: post ? `${post.attributes.title.toUpperCase()} | TERMINAL LOG` : 'LOADING... | TERMINAL LOG', |
| 104 | + description: post ? post.body.substring(0, 150) : '', |
| 105 | + keywords: post && post.attributes.tags ? post.attributes.tags.join(', ') : '', |
| 106 | + ogTitle: post ? `${post.attributes.title.toUpperCase()} | TERMINAL LOG` : 'TERMINAL LOG', |
| 107 | + ogDescription: post ? post.body.substring(0, 150) : '', |
| 108 | + ogImage: post |
| 109 | + ? post.attributes.ogImage || |
| 110 | + post.attributes.image || |
| 111 | + '/images/asset/ogtitle.png' |
| 112 | + : '/images/asset/ogtitle.png', |
| 113 | + twitterCard: 'summary_large_image', |
| 114 | + twitterTitle: post ? `${post.attributes.title.toUpperCase()} | TERMINAL LOG` : 'TERMINAL LOG', |
| 115 | + twitterDescription: post ? post.body.substring(0, 150) : '', |
| 116 | + twitterImage: post |
| 117 | + ? post.attributes.ogImage || |
| 118 | + post.attributes.image || |
| 119 | + '/images/asset/ogtitle.png' |
| 120 | + : '/images/asset/ogtitle.png', |
| 121 | + }); |
| 122 | + |
102 | 123 | useEffect(() => { |
103 | 124 | setHasTrackedRead(false); |
104 | 125 | }, [currentSlug]); |
@@ -321,33 +342,7 @@ const TerminalBlogPostPage = () => { |
321 | 342 | <div className="min-h-screen bg-black text-orange-500 font-mono overflow-y-auto custom-scrollbar-terminal relative"> |
322 | 343 | <style>{` |
323 | 344 | body { background-color: black; } |
324 | | - .shadow-orange-glow { box-shadow: 0 0 10px rgba(251, 146, 60, 0.7); } |
325 | | - .text-orange-500 { color: #fb923c; } /* Tailwind orange-500 */ |
326 | | - .border-orange-500 { border-color: #fb923c; } |
327 | | - .custom-scrollbar-terminal::-webkit-scrollbar { |
328 | | - width: 8px; |
329 | | - } |
330 | | - .custom-scrollbar-terminal::-webkit-scrollbar-track { |
331 | | - background: #1a1a1a; |
332 | | - } |
333 | | - .custom-scrollbar-terminal::-webkit-scrollbar-thumb { |
334 | | - background-color: #fb923c; |
335 | | - border-radius: 4px; |
336 | | - border: 1px solid #9a3412; |
337 | | - } |
338 | 345 | `}</style> |
339 | | - <Seo |
340 | | - title={`${post.attributes.title.toUpperCase()} | TERMINAL LOG`} |
341 | | - description={post.body.substring(0, 150)} |
342 | | - keywords={post.attributes.tags ? post.attributes.tags.join(', ') : ''} |
343 | | - ogTitle={`${post.attributes.title.toUpperCase()} | TERMINAL LOG`} |
344 | | - ogDescription={post.body.substring(0, 150)} |
345 | | - ogImage={post.attributes.image || '/images/asset/ogtitle.png'} |
346 | | - twitterCard="summary_large_image" |
347 | | - twitterTitle={`${post.attributes.title.toUpperCase()} | TERMINAL LOG`} |
348 | | - twitterDescription={post.body.substring(0, 150)} |
349 | | - twitterImage={post.attributes.image || '/images/asset/ogtitle.png'} |
350 | | - /> |
351 | 346 |
|
352 | 347 | {/* Optional Scanline Effect Overlay */} |
353 | 348 | <div |
|
0 commit comments