Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a9b022d
removed lume entry point file. Deno now supports import maps to resol…
oscarotero Sep 3, 2025
eccd933
Updated Lume to v3. Comented the failing code to fix it in the next c…
oscarotero Sep 3, 2025
6808bbd
fixed jsx configuration
oscarotero Sep 3, 2025
533c0a7
folder components
oscarotero Sep 3, 2025
da296aa
moved js files for browser to a subdirectory
oscarotero Sep 3, 2025
920b458
removed the .client subextension since it's not longer needed
oscarotero Sep 3, 2025
383681c
tailwind no longer depends on postcss
oscarotero Sep 3, 2025
7afe882
fixed a bug in Lume that prevent's to show the debugbar
oscarotero Sep 3, 2025
938d1ab
fixed toc
oscarotero Sep 3, 2025
e33c09c
fixed esbuild compilation
oscarotero Sep 3, 2025
a2e05ef
update Lume to stable version
oscarotero Sep 4, 2025
eb7db62
Merge branch 'denoland:main' into main
oscarotero Sep 4, 2025
733218e
use precompile mode for jsx
oscarotero Sep 4, 2025
99a4dec
removed unnecessary variable
oscarotero Sep 5, 2025
17a8205
merge 7a0c03b811df6da3f590cbfd84cf55af369ab2ea
thisisjofrank Sep 4, 2025
dde146f
merge d38ea23e109c8648ba16a05c91def20a3c99a240
philhawksworth Sep 4, 2025
b88392c
warn if no api keys, dont fail (#2502)
thisisjofrank Sep 4, 2025
005aaa8
Fix typo: `--allow-imports` -> `--allow-import` (#2499)
jespertheend Sep 4, 2025
4e6b03f
delete log (#2503)
thisisjofrank Sep 4, 2025
c311126
fix broken urls at source rather than in the indexer (#2505)
thisisjofrank Sep 4, 2025
df41f0b
docs(cli/repl): Elaborate on what the Ctrl-V keybinding does (#1481)
frou Sep 4, 2025
5b9f857
type fixes (#2507)
thisisjofrank Sep 5, 2025
08d7ac0
fixed conflicts
oscarotero Sep 5, 2025
22b6a31
use an alias to fix build error
oscarotero Sep 5, 2025
62db753
removed tailwindcss command
oscarotero Sep 5, 2025
9b312f3
fixed missing file
oscarotero Sep 9, 2025
6c1291f
fixed missing example pages
oscarotero Sep 9, 2025
8dce9fb
updated lume
oscarotero Sep 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-explicit-any
import ReferenceSidebarNav from "../reference/_components/ReferenceSidebarNav.tsx";
import ReferenceSidebarNav from "../../reference/_components/ReferenceSidebarNav.tsx";

export default function (data: Lume.Data) {
const sectionData = data.sectionData;
Expand Down Expand Up @@ -129,5 +129,3 @@ function SidebarCategoryHeading(props: {
</h2>
);
}

export const js = `import "/js/sidebar.client.js";`;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,3 @@ export default function () {
</button>
);
}

export const js = `
import "/js/darkmode.client.js";
import "/js/darkmode-toggle.client.js";
`;
File renamed without changes.
2 changes: 2 additions & 0 deletions _components/ThemeToggle/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import "./darkmode.js";
import "./darkmode-toggle.js";
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,3 @@ function urlMatcher(url: string): string | undefined {
const match = url.match(urlPattern);
return match?.[3];
}

export const js = `
import "/js/youtube-lite.client.js";
`;
File renamed without changes.
31 changes: 14 additions & 17 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import "@std/dotenv/load";

import lume from "lume/mod.ts";
import esbuild from "lume/plugins/esbuild.ts";
import jsx from "lume/plugins/jsx_preact.ts";
import jsx from "lume/plugins/jsx.ts";
import mdx from "lume/plugins/mdx.ts";
import ogImages from "lume/plugins/og_images.ts";
import postcss from "lume/plugins/postcss.ts";
import redirects from "lume/plugins/redirects.ts";
import search from "lume/plugins/search.ts";
import sitemap from "lume/plugins/sitemap.ts";
import postcssNesting from "npm:@tailwindcss/nesting";

import tailwind from "@tailwindcss/postcss";
import tailwind from "lume/plugins/tailwindcss.ts";

import Prism from "./prism.ts";

Expand Down Expand Up @@ -159,23 +156,25 @@ site.use(search());
site.use(jsx());
site.use(mdx());

site.use(
postcss({
includes: false,
plugins: [postcssNesting, tailwind()],
}),
);

site.add("js");
site.use(
esbuild({
extensions: [".client.ts", ".client.js"],
extensions: [".ts"],
options: {
minify: false,
splitting: true,
alias: {
"node:crypto": "./_node-crypto.js",
},
},
}),
);

site.add("style.css");
site.use(tailwind({
minify: true,
}));

site.use(toc({ anchor: false }));
site.use(title());
site.use(sitemap());
Expand Down Expand Up @@ -209,7 +208,7 @@ site.addEventListener("afterBuild", async () => {
Deno.writeTextFileSync(site.dest("llms-full.txt"), llmsFullTxt);
log.info("Generated llms-full.txt in site root");
} catch (error) {
log.error("Error generating LLMs files:", error);
log.error("Error generating LLMs files:" + error);
}
}
});
Expand Down Expand Up @@ -297,7 +296,7 @@ if (Deno.env.get("BUILD_TYPE") == "FULL") {
site.data("openGraphLayout", "/open_graph/default.jsx");
site.use(
ogImages({
satori: {
options: {
width: 1200,
height: 630,
fonts: [
Expand Down Expand Up @@ -326,13 +325,11 @@ if (Deno.env.get("BUILD_TYPE") == "FULL") {
},
],
},
cache: false,
}),
);
}

site.scopedUpdates(
(path) => path == "/overrides.css",
(path) => /\.(js|ts)$/.test(path),
(path) => path.startsWith("/api/deno/"),
);
Expand Down
32 changes: 13 additions & 19 deletions _includes/doc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,19 @@ export default function Doc(data: Lume.Data, helpers: Lume.Helpers) {
function getTocCtx(
d: Lume.Data,
): { document_navigation: unknown; document_navigation_str: string } | null {
const ch: unknown = (d as unknown as { children?: unknown })?.children;
if (ch && typeof ch === "object" && "props" in ch) {
const props: unknown = (ch as { props?: unknown }).props;
if (props && typeof props === "object" && "data" in props) {
const pdata: unknown = (props as { data?: unknown }).data;
if (pdata && typeof pdata === "object" && "toc_ctx" in pdata) {
const toc: unknown = (pdata as { toc_ctx?: unknown }).toc_ctx;
if (
toc && typeof toc === "object" &&
"document_navigation" in toc &&
"document_navigation_str" in toc
) {
const t = toc as {
document_navigation: unknown;
document_navigation_str: string;
};
return t;
}
}
const pdata = d.data;
if (pdata && typeof pdata === "object" && "toc_ctx" in pdata) {
const toc: unknown = (pdata as { toc_ctx?: unknown }).toc_ctx;
if (
toc && typeof toc === "object" &&
"document_navigation" in toc &&
"document_navigation_str" in toc
) {
const t = toc as {
document_navigation: unknown;
document_navigation_str: string;
};
return t;
}
}
return null;
Expand Down
16 changes: 8 additions & 8 deletions _includes/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function Layout(data: Lume.Data) {

<link
rel="stylesheet"
href={`/styles.css${fingerprint ? `?v=${fingerprint}` : ""}`}
href={`/style.css${fingerprint ? `?v=${fingerprint}` : ""}`}
/>

<link
Expand Down Expand Up @@ -59,13 +59,13 @@ export default function Layout(data: Lume.Data) {
name="keywords"
content="Deno, JavaScript, TypeScript, reference, documentation, guide, tutorial, example"
/>
<script type="module" defer src="/components.js"></script>
<script type="module" defer src="/main.client.js"></script>
<script type="module" defer src="/lint_rules.client.js"></script>
<script type="module" defer src="/copy.client.js"></script>
<script type="module" defer src="/tabs.client.js"></script>
<script type="module" defer src="/feedback.client.js"></script>
<script type="module" defer src="/search.client.js"></script>
<script type="module" defer src="/script.js"></script>
<script type="module" defer src="/js/main.js"></script>
<script type="module" defer src="/js/lint_rules.js"></script>
<script type="module" defer src="/js/copy.js"></script>
<script type="module" defer src="/js/tabs.js"></script>
<script type="module" defer src="/js/feedback.js"></script>
<script type="module" defer src="/js/search.js"></script>
<script
async
src="https://www.googletagmanager.com/gtm.js?id=GTM-5B5TH8ZJ"
Expand Down
2 changes: 1 addition & 1 deletion _includes/lintRule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function LintRule(props: Lume.Data, _helpers: Lume.Helpers) {

return (
<>
<LintRuleTags tags={tags} ruleName={props.title} />
<LintRuleTags tags={tags} ruleName={props.title!} />
{props.children}
</>
);
Expand Down
2 changes: 0 additions & 2 deletions _includes/open_graph/cli-commands.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/** @jsxImportSource npm:[email protected] */

export default function ({ title, description, openGraphTitle }) {
if (!openGraphTitle) {
title = "deno help";
Expand Down
2 changes: 0 additions & 2 deletions _includes/open_graph/default.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/** @jsxImportSource npm:[email protected] */

export default function ({ title, description, openGraphColor }) {
// Process text to replace superscript EA with "Early Access"
const processEarlyAccessText = (text) => {
Expand Down
2 changes: 0 additions & 2 deletions _includes/open_graph/examples.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/** @jsxImportSource npm:[email protected] */

export default function ({ title, description }) {
// Process text to replace superscript EA with "Early Access"
const processEarlyAccessText = (text) => {
Expand Down
1 change: 1 addition & 0 deletions _node-crypto.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const crypto = globalThis.crypto;
32 changes: 22 additions & 10 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@
"@std/media-types": "jsr:@std/media-types@^1.0.3",
"@std/path": "jsr:@std/path@^1.0.8",
"@deno/doc": "jsr:@deno/[email protected]",
"@tailwindcss/cli": "npm:@tailwindcss/cli@^4.1.11",
"@tailwindcss/postcss": "npm:@tailwindcss/postcss@^4.1.11",
"ga4": "https://raw.githubusercontent.com/denoland/ga4/04a1ce209116f158b5ef1658b957bdb109db68ed/mod.ts",
"lume/": "https://deno.land/x/[email protected]/",
"lume/": "https://deno.land/x/[email protected]/",
"lume/jsx-runtime": "https://deno.land/x/[email protected]/jsx-runtime.ts",
"googleapis": "npm:googleapis@^144.0.0",
"postcss": "npm:postcss@^8.5.6",
"prismjs": "npm:[email protected]",
"tailwindcss": "npm:tailwindcss@^4.1.11",
"@orama/core": "jsr:@orama/core@^1.2.4"
},
"tasks": {
"dev": "LUME_LOGS=WARN deno run --env-file -A lume.ts -s",
"lume": "deno run --env-file -A lume/cli.ts",
"dev": "LUME_LOGS=WARN deno task lume -s",
"serve": "deno task dev",
"serve:style": "BUILD_TYPE=FULL deno task lume -s --config=_config-styleguide.ts",
"start": "deno task dev",
"build": "deno task generate:reference && BUILD_TYPE=FULL deno run --env-file -A lume.ts && tailwindcss -i styles.css -o _site/styles.css --minify",
"build:light": "deno run --env-file -A lume.ts",
"build": "deno task generate:reference && BUILD_TYPE=FULL deno task lume",
"build:light": "deno task lume",
"prod": "deno run --allow-read --allow-env --allow-net server.ts",
"test": "deno test -A",
"check:links": "deno run --no-lock --allow-net --allow-env .github/workflows/better_link_checker.ts",
Expand All @@ -44,8 +42,8 @@
"types": [
"lume/types.ts"
],
"jsx": "react-jsx",
"jsxImportSource": "npm:preact"
"jsx": "precompile",
"jsxImportSource": "lume"
},
"test": {
"exclude": [
Expand All @@ -57,5 +55,19 @@
"reference_gen",
"orama"
],
"unstable": [
"temporal",
"fmt-component"
],
"lint": {
"plugins": [
"https://deno.land/x/[email protected]/lint.ts"
],
"rules": {
"exclude": [
"no-import-prefix"
]
}
},
"nodeModulesDir": "auto"
}
Loading