Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F41
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Oct 25, 00:49 (21 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31
Default Alt Text
(1 KB)
Attached To
Mode
rB blog
Attached
Detach File
Event Timeline