Skip to content

Commit

Permalink
Added syntax highlighting for code blocks using highlight.js library …
Browse files Browse the repository at this point in the history
…in Layout component.
  • Loading branch information
yasuaki640 committed Jul 13, 2024
1 parent 99b2f9d commit e9e2296
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/views/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ import type { FC } from "hono/jsx";

export const Layout: FC = ({ children }) => (
<html lang={"ja"}>
<head>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"></script>
<script>hljs.highlightAll();</script>
</head>

<body>{children}</body>
</html>
);

0 comments on commit e9e2296

Please sign in to comment.