Publish website with silverbullet-publish
This commit is contained in:
parent
0ed956feda
commit
8905195240
@ -65,5 +65,5 @@
|
||||
"prettier": "^2.5.1",
|
||||
"typescript": "^4.6.2"
|
||||
},
|
||||
"version": "0.0.32"
|
||||
"version": "0.0.33"
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
[build]
|
||||
publish = "website_build"
|
||||
command = "./scripts/build_website.sh"
|
||||
|
||||
[context.demo]
|
||||
command = "./scripts/build_demo.sh"
|
||||
|
32
package-lock.json
generated
32
package-lock.json
generated
@ -28,7 +28,7 @@
|
||||
},
|
||||
"mattermost-plugin/webapp": {
|
||||
"name": "silverbullet-mattermost-plugin",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.0.1",
|
||||
@ -9784,7 +9784,7 @@
|
||||
},
|
||||
"packages/common": {
|
||||
"name": "@silverbulletmd/common",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.0.1",
|
||||
@ -9813,7 +9813,7 @@
|
||||
},
|
||||
"packages/plugos": {
|
||||
"name": "@plugos/plugos",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jest/globals": "^27.5.1",
|
||||
@ -9869,12 +9869,12 @@
|
||||
},
|
||||
"packages/plugos-silverbullet-syscall": {
|
||||
"name": "@silverbulletmd/plugos-silverbullet-syscall",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT"
|
||||
},
|
||||
"packages/plugos-syscall": {
|
||||
"name": "@plugos/plugos-syscall",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT"
|
||||
},
|
||||
"packages/plugos/node_modules/@lezer/common": {
|
||||
@ -12314,13 +12314,13 @@
|
||||
},
|
||||
"packages/plugs": {
|
||||
"name": "@silverbulletmd/plugs",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jest/globals": "^27.5.1",
|
||||
"@lezer/generator": "1.0.0",
|
||||
"@lezer/lr": "1.0.0",
|
||||
"@silverbulletmd/common": "^0.0.32",
|
||||
"@silverbulletmd/common": "^0.0.33",
|
||||
"@types/yaml": "^1.9.7",
|
||||
"handlebars": "^4.7.7",
|
||||
"markdown-it": "^12.3.2",
|
||||
@ -12352,7 +12352,7 @@
|
||||
},
|
||||
"packages/server": {
|
||||
"name": "@silverbulletmd/server",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/lang-javascript": "6.0.0",
|
||||
@ -12360,9 +12360,9 @@
|
||||
"@codemirror/legacy-modes": "6.0.0",
|
||||
"@jest/globals": "^27.5.1",
|
||||
"@lezer/markdown": "1.0.1",
|
||||
"@silverbulletmd/common": "^0.0.32",
|
||||
"@silverbulletmd/plugs": "^0.0.32",
|
||||
"@silverbulletmd/web": "^0.0.32",
|
||||
"@silverbulletmd/common": "^0.0.33",
|
||||
"@silverbulletmd/plugs": "^0.0.33",
|
||||
"@silverbulletmd/web": "^0.0.33",
|
||||
"better-sqlite3": "^7.5.0",
|
||||
"body-parser": "^1.19.2",
|
||||
"buffer": "^6.0.3",
|
||||
@ -13656,7 +13656,7 @@
|
||||
},
|
||||
"packages/web": {
|
||||
"name": "@silverbulletmd/web",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.0.1",
|
||||
@ -18329,7 +18329,7 @@
|
||||
"@jest/globals": "^27.5.1",
|
||||
"@lezer/generator": "1.0.0",
|
||||
"@lezer/lr": "1.0.0",
|
||||
"@silverbulletmd/common": "^0.0.32",
|
||||
"@silverbulletmd/common": "^0.0.33",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"@types/yaml": "^1.9.7",
|
||||
"handlebars": "^4.7.7",
|
||||
@ -18368,9 +18368,9 @@
|
||||
"@parcel/transformer-sass": "2.5.0",
|
||||
"@parcel/transformer-webmanifest": "2.5.0",
|
||||
"@parcel/validator-typescript": "2.5.0",
|
||||
"@silverbulletmd/common": "^0.0.32",
|
||||
"@silverbulletmd/plugs": "^0.0.32",
|
||||
"@silverbulletmd/web": "^0.0.32",
|
||||
"@silverbulletmd/common": "^0.0.33",
|
||||
"@silverbulletmd/plugs": "^0.0.33",
|
||||
"@silverbulletmd/web": "^0.0.33",
|
||||
"@types/cors": "^2.8.12",
|
||||
"@types/events": "^3.0.0",
|
||||
"@types/express": "^4.17.13",
|
||||
|
@ -4,7 +4,7 @@
|
||||
"name": "Zef Hemel",
|
||||
"email": "zef@zef.me"
|
||||
},
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.0.1",
|
||||
|
@ -4,6 +4,6 @@
|
||||
"name": "Zef Hemel",
|
||||
"email": "zef@zef.me"
|
||||
},
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ export async function getAttachmentMeta(name: string): Promise<AttachmentMeta> {
|
||||
|
||||
export async function readAttachment(
|
||||
name: string
|
||||
): Promise<{ buffer: ArrayBuffer; meta: AttachmentMeta }> {
|
||||
): Promise<{ data: string; meta: AttachmentMeta }> {
|
||||
return syscall("space.readAttachment", name);
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,6 @@
|
||||
"name": "Zef Hemel",
|
||||
"email": "zef@zef.me"
|
||||
},
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
"name": "Zef Hemel",
|
||||
"email": "zef@zef.me"
|
||||
},
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"plugos-bundle": "./dist/plugos/plugos-bundle.js",
|
||||
|
@ -4,7 +4,7 @@
|
||||
"name": "Zef Hemel",
|
||||
"email": "zef@zef.me"
|
||||
},
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"generate": "lezer-generator query/query.grammar -o query/parse-query.js",
|
||||
@ -34,7 +34,7 @@
|
||||
"@jest/globals": "^27.5.1",
|
||||
"@lezer/generator": "1.0.0",
|
||||
"@lezer/lr": "1.0.0",
|
||||
"@silverbulletmd/common": "^0.0.32",
|
||||
"@silverbulletmd/common": "^0.0.33",
|
||||
"@types/yaml": "^1.9.7",
|
||||
"handlebars": "^4.7.7",
|
||||
"markdown-it": "^12.3.2",
|
||||
|
@ -4,7 +4,7 @@
|
||||
"name": "Zef Hemel",
|
||||
"email": "zef@zef.me"
|
||||
},
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"silverbullet": "./dist/server/server.js"
|
||||
@ -39,9 +39,9 @@
|
||||
"@codemirror/legacy-modes": "6.0.0",
|
||||
"@jest/globals": "^27.5.1",
|
||||
"@lezer/markdown": "1.0.1",
|
||||
"@silverbulletmd/common": "^0.0.32",
|
||||
"@silverbulletmd/plugs": "^0.0.32",
|
||||
"@silverbulletmd/web": "^0.0.32",
|
||||
"@silverbulletmd/common": "^0.0.33",
|
||||
"@silverbulletmd/plugs": "^0.0.33",
|
||||
"@silverbulletmd/web": "^0.0.33",
|
||||
"better-sqlite3": "^7.5.0",
|
||||
"body-parser": "^1.19.2",
|
||||
"buffer": "^6.0.3",
|
||||
|
@ -4,7 +4,7 @@
|
||||
"name": "Zef Hemel",
|
||||
"email": "zef@zef.me"
|
||||
},
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"watch": "rm -rf .parcel-cache && parcel watch",
|
||||
|
28
scripts/build_demo.sh
Normal file
28
scripts/build_demo.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Building silver bullet"
|
||||
npm run clean-build
|
||||
echo "Cleaning website build dir"
|
||||
rm -rf website_build
|
||||
mkdir -p website_build/page/_plug
|
||||
echo "Copying silverbullet runtime files"
|
||||
cp -r packages/web/dist/* website_build/
|
||||
echo "Copying netlify config files"
|
||||
cp website/{_redirects,_headers} website_build/
|
||||
|
||||
echo "Copying website markdown files"
|
||||
cp -r website/* website_build/page/
|
||||
rm website_build/page/{_redirects,_headers}
|
||||
|
||||
echo "Copying standard set of plugs"
|
||||
cp packages/plugs/dist/* website_build/page/_plug/
|
||||
|
||||
echo "Applying rename magic"
|
||||
find website_build/page/ -depth -name "*.md" -exec sh -c 'mv "$1" "${1%.md}"' _ {} \;
|
||||
find website_build/page/ -depth -name "*.plug.json" -exec sh -c 'mv "$1" "${1%.plug.json}"' _ {} \;
|
||||
|
||||
echo "Generating file listing"
|
||||
node scripts/generate_fs_list.js > website_build/index.json
|
||||
|
||||
echo > website_build/empty.md
|
||||
|
@ -1,27 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Building silver bullet"
|
||||
npm run clean-build
|
||||
echo "Cleaning website build dir"
|
||||
rm -rf website_build
|
||||
mkdir -p website_build/page/_plug
|
||||
echo "Copying silverbullet runtime files"
|
||||
cp -r packages/web/dist/* website_build/
|
||||
echo "Copying netlify config files"
|
||||
cp website/{_redirects,_headers} website_build/
|
||||
|
||||
echo "Copying website markdown files"
|
||||
cp -r website/* website_build/page/
|
||||
rm website_build/page/{_redirects,_headers}
|
||||
|
||||
echo "Copying standard set of plugs"
|
||||
cp packages/plugs/dist/* website_build/page/_plug/
|
||||
|
||||
echo "Applying rename magic"
|
||||
find website_build/page/ -depth -name "*.md" -exec sh -c 'mv "$1" "${1%.md}"' _ {} \;
|
||||
find website_build/page/ -depth -name "*.plug.json" -exec sh -c 'mv "$1" "${1%.plug.json}"' _ {} \;
|
||||
|
||||
echo "Generating file listing"
|
||||
node scripts/generate_fs_list.js > website_build/index.json
|
||||
|
||||
echo > website_build/empty.md
|
||||
npx --yes @silverbulletmd/publish -o website_build --index website
|
4
website/test page.md
Normal file
4
website/test page.md
Normal file
@ -0,0 +1,4 @@
|
||||
Syup
|
||||
|
||||
![](attachment/bla)
|
||||
kljhaef
|
@ -1,3 +1,4 @@
|
||||
|
||||
---
|
||||
©️ [[Silver Bullet]] authors.
|
||||
_Published with [Silver Bullet Publish](https://github.com/silverbulletmd/silverbullet-publish)._
|
Loading…
Reference in New Issue
Block a user