Skip to content

Commit

Permalink
Improve styles
Browse files Browse the repository at this point in the history
  • Loading branch information
edenreich committed Mar 10, 2024
1 parent 4dbfcbe commit 65d3442
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,21 @@ code {
font-size: 12px;
}
}

code.hljs {
background: #151515;
border-radius: 10px;
}

p > code {
padding: 0;
margin: 0;
font-weight: 600;
color: #1d1d1e;
background-color: #fcfcfc;
}

p {
margin-top: 0;
margin-bottom: 1rem;
}
2 changes: 2 additions & 0 deletions src/utils/markdownParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import remarkGfm from 'remark-gfm';
import langHttp from 'highlight.js/lib/languages/http';
import langNginx from 'highlight.js/lib/languages/nginx';
import langDockerfile from 'highlight.js/lib/languages/dockerfile';
import langYaml from 'highlight.js/lib/languages/yaml';
import { MarkdownPost } from '@/types/MarkdownPost';

export async function fetchMarkdownPosts(): Promise<MarkdownPost[]> {
Expand All @@ -36,6 +37,7 @@ export async function fetchMarkdownPosts(): Promise<MarkdownPost[]> {
http: langHttp,
nginx: langNginx,
dockerfile: langDockerfile,
yaml: langYaml,
},
})
.use(rehypeStringify)
Expand Down

0 comments on commit 65d3442

Please sign in to comment.