Skip to content

Commit

Permalink
feat: sintax highlight in codes
Browse files Browse the repository at this point in the history
  • Loading branch information
allbertuu committed Jan 17, 2024
1 parent 8ef82f5 commit 46ede65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/PostBody/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const PostBody: React.FC = () => {
return (
<div className="py-8 sm:px-10">
{post && (
<Markdown className="prose prose-invert max-w-full prose-headings:border-b prose-headings:border-b-blue-300 prose-a:text-red-500/95 hover:prose-a:text-red-500/80 prose-blockquote:text-[#ffffff91] prose-img:w-[75%]">
<Markdown className="prose prose-invert max-w-full prose-headings:border-b prose-headings:border-b-blue-300 prose-a:text-red-500/95 hover:prose-a:text-red-500/80 prose-blockquote:text-[#ffffff91] prose-pre:bg-[#22272e] prose-img:w-[75%]">
{post.body || DEFAULT_BODY}
</Markdown>
)}
Expand Down
6 changes: 6 additions & 0 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export default function Document() {
href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Titillium+Web:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark-dimmed.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
</Head>
<body className="bg-blue-700">
<Main />
Expand Down

1 comment on commit 46ede65

@vercel
Copy link

@vercel vercel bot commented on 46ede65 Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog-do-alberto – ./

blog-do-alberto.vercel.app
blog-do-alberto-git-main-allbertuu.vercel.app
blog-do-alberto-allbertuu.vercel.app

Please sign in to comment.