Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Jul 5, 2022
1 parent bd8c791 commit f7c3274
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
27 changes: 15 additions & 12 deletions packages/bun-landing/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { readFileSync } from "fs";
import * as shiki from "shiki";

const DOCS = "https://github.com/Jarred-Sumner/bun#Reference";

// because we don't want to wait for it to reload everytime this page reloads
globalThis._highlighter ||= await shiki.getHighlighter({
theme: "dracula",
Expand Down Expand Up @@ -211,15 +213,6 @@ export default ({ inlineCSS }) => (
<head>
<meta charSet="UTF-8" />

{inlineCSS ? (
<style
dangerouslySetInnerHTML={{
__html: readFileSync(import.meta.dir + "/index.css", "utf8"),
}}
></style>
) : (
<link rel="stylesheet" href="/index.css" />
)}
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
property="og:title"
Expand All @@ -232,6 +225,16 @@ export default ({ inlineCSS }) => (
a native bundler, transpiler, task runner and npm client built-in.`}
/>
<title>Bun is a fast all-in-one JavaScript runtime</title>

{inlineCSS ? (
<style
dangerouslySetInnerHTML={{
__html: readFileSync(import.meta.dir + "/index.css", "utf8"),
}}
></style>
) : (
<link rel="stylesheet" href="/index.css" />
)}
</head>

<body>
Expand All @@ -249,7 +252,7 @@ export default ({ inlineCSS }) => (

<nav className="Navigation">
<li>
<a className="NavText" href="https://bun.sh/docs">
<a className="NavText" href={DOCS}>
Docs
</a>
</li>
Expand Down Expand Up @@ -646,8 +649,8 @@ export default {
<a href="https://github.com/Jarred-Sumner/bun/tree/main/examples">
more examples
</a>{" "}
and check out <a href="/docs">the docs</a>. If you have any
questions or want help, join{" "}
and check out <a href={DOCS}>the docs</a>. If you have any questions
or want help, join{" "}
<a href="https://bun.sh/discord">Bun's Discord</a>
</p>

Expand Down
4 changes: 4 additions & 0 deletions packages/bun-landing/public/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -922,3 +922,7 @@ li {
margin-bottom: 2rem;
color: #333;
}

img {
object-fit: contain;
}
Loading

0 comments on commit f7c3274

Please sign in to comment.