Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/lib/build.ts b/lib/build.ts
index 7f372b8..c7e8285 100644
--- a/lib/build.ts
+++ b/lib/build.ts
@@ -1,6 +1,6 @@
import { VFile } from "vfile";
import { globStream } from "glob";
-import { concat, connect, from, map, merge, mergeMap, toArray } from "rxjs";
+import { concat, connect, filter, from, map, merge, mergeMap, toArray } from "rxjs";
import { read, write } from "to-vfile";
import { compile } from "mdx";
import { basename, join, resolve } from "@std/path";
@@ -21,6 +21,7 @@ import Index from "#src/pages/index.tsx";
import type { Article } from "#/types.ts";
const EPOCH = DateTime.fromSeconds(0);
+const PRODUCTION = Boolean(Deno.env.get("BLOG_PRODUCTION"));
async function importFrom<T = unknown>(source: VFile): Promise<T> {
const blob = new Blob([source.value], { type: "text/javascript" });
@@ -84,6 +85,7 @@ concat(
return file as Article;
}),
+ filter((article) => !PRODUCTION || article.data.date),
connect((articles$) =>
merge(
articles$.pipe(

File Metadata

Mime Type
text/x-diff
Expires
Sun, Oct 25, 00:49 (20 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31
Default Alt Text
(1 KB)

Event Timeline