Fixing netlify

This commit is contained in:
Zef Hemel
2024-01-20 22:53:51 +01:00
parent 9734c0f14c
commit 4133cabd52
11 changed files with 60 additions and 17 deletions
+4 -2
View File
@@ -8,9 +8,11 @@ indexPage: index
`;
export const INDEX_TEMPLATE =
`Hello! And welcome to your brand new SilverBullet space!
`This is the index page of your fresh SilverBullet space. It is the default page that is loaded when you open a space.
For your convenience we're including an on-boarding live template below. Enjoy!
\`\`\`template
page: "[[!silverbullet.md/Getting Started]]"
page: "[[!localhost:3001/Getting Started]]"
\`\`\`
`;
+5
View File
@@ -57,6 +57,11 @@ export class HttpSpacePrimitives implements SpacePrimitives {
if (
errorMessage.includes("fetch") || errorMessage.includes("load failed")
) {
console.error(
"Got error fetching, throwing offline",
url,
e.errorMessage,
);
throw new Error("Offline");
}
throw e;
+1 -2
View File
@@ -1,9 +1,8 @@
import { SETTINGS_TEMPLATE } from "./PAGE_TEMPLATES.ts";
import { INDEX_TEMPLATE, SETTINGS_TEMPLATE } from "./PAGE_TEMPLATES.ts";
import { YAML } from "./deps.ts";
import { SpacePrimitives } from "./spaces/space_primitives.ts";
import { expandPropertyNames } from "$sb/lib/json.ts";
import type { BuiltinSettings } from "../web/types.ts";
import { INDEX_TEMPLATE } from "./PAGE_TEMPLATES.ts";
/**
* Runs a function safely by catching any errors and logging them to the console.