No More Collab. Fixes #449
* Fully removes real-time collaboration * URL scheme rewrite
This commit is contained in:
+11
-15
@@ -10,33 +10,29 @@ if [ "$1" != "local" ]; then
|
||||
|
||||
fi
|
||||
|
||||
deno task clean
|
||||
mkdir -p website_build/_plug website_build/_client
|
||||
|
||||
echo "Copying website content"
|
||||
cp -r website/* website_build/
|
||||
#rm website_build/{_redirects,_headers}
|
||||
|
||||
echo "Building silver bullet"
|
||||
rm -rf website_build
|
||||
deno task clean
|
||||
deno task build
|
||||
echo "Cleaning website build dir"
|
||||
rm -rf website_build
|
||||
mkdir -p website_build/_fs/_plug website_build/_client
|
||||
|
||||
echo "Copying silverbullet runtime files"
|
||||
cp dist_client_bundle/* website_build/
|
||||
cp -r dist_client_bundle/.client/* website_build/_client/
|
||||
|
||||
echo "And all plugs"
|
||||
cp -r dist_plug_bundle/_plug/* website_build/_fs/_plug/
|
||||
cp -r dist_plug_bundle/_plug/* website_build/_plug/
|
||||
#echo "And additional ones"
|
||||
curl https://raw.githubusercontent.com/silverbulletmd/silverbullet-mermaid/main/mermaid.plug.js > website_build/_fs/_plug/mermaid.plug.js
|
||||
curl https://raw.githubusercontent.com/silverbulletmd/silverbullet-mermaid/main/mermaid.plug.js > website_build/_plug/mermaid.plug.js
|
||||
echo "But remove some plugs"
|
||||
rm -rf website_build/_fs/_plug/{plugmd}.plug.js
|
||||
rm -rf website_build/_plug/{plugmd}.plug.js
|
||||
|
||||
echo "Copying website content into fs/"
|
||||
cp -r website/* website_build/_fs/
|
||||
rm website_build/_fs/{_redirects,_headers}
|
||||
|
||||
echo "Copy website files another time into the root"
|
||||
cp -r website/* website_build/
|
||||
|
||||
# Genereate random modified date, and replace in _headers too
|
||||
# Generate random modified date, and replace in _headers too
|
||||
export LAST_MODIFIED_TIMESTAMP=$RANDOM
|
||||
|
||||
cat website/_headers | sed "s/12345/$LAST_MODIFIED_TIMESTAMP/g" > website_build/_headers
|
||||
|
||||
@@ -4,7 +4,7 @@ import { walk } from "https://deno.land/std@0.165.0/fs/mod.ts";
|
||||
import { resolve } from "https://deno.land/std@0.165.0/path/mod.ts";
|
||||
import { mime } from "https://deno.land/x/mimetypes@v1.0.0/mod.ts";
|
||||
|
||||
const rootDir = resolve("website_build/_fs");
|
||||
const rootDir = resolve("website_build");
|
||||
|
||||
const lastModifiedTimestamp = +Deno.env.get("LAST_MODIFIED_TIMESTAMP")! ||
|
||||
Date.now();
|
||||
@@ -14,7 +14,7 @@ for await (
|
||||
const file of walk(rootDir, {
|
||||
includeDirs: false,
|
||||
// Exclude hidden files
|
||||
skip: [/^.*\/\..+$/],
|
||||
skip: [/^.*\/(\..+|_redirects|_headers|_client\/.*)$/],
|
||||
})
|
||||
) {
|
||||
const fullPath = file.path;
|
||||
|
||||
Reference in New Issue
Block a user