progress on gettin content using RMB
This commit is contained in:
parent
accef28c35
commit
00c8893dd2
@ -2,8 +2,8 @@
|
|||||||
base_url = "https://zola-twcss.vercel.app"
|
base_url = "https://zola-twcss.vercel.app"
|
||||||
# Change this to your own URL! Please note this variable **must** be uncommented.
|
# Change this to your own URL! Please note this variable **must** be uncommented.
|
||||||
|
|
||||||
title = "Site name here"
|
title = "Our World"
|
||||||
description="Site description here"
|
description="Our global digital backbone"
|
||||||
|
|
||||||
# When set to "true", a feed is automatically generated.
|
# When set to "true", a feed is automatically generated.
|
||||||
# generate_feed = true
|
# generate_feed = true
|
||||||
|
@ -7,7 +7,7 @@ draft: false # Make it "true" if you don't want Zola to "publish" yet
|
|||||||
extra:
|
extra:
|
||||||
subtitle: "The UNIQUE Post 1 subtitle" # Quotation marks allow colons, semicolons, etc.
|
subtitle: "The UNIQUE Post 1 subtitle" # Quotation marks allow colons, semicolons, etc.
|
||||||
author: HANNAH CORDES
|
author: HANNAH CORDES
|
||||||
imgPath: processed_images/threefold-blog.png
|
imgPath: static/images/threefold-blog.png
|
||||||
date: 2018-10-17T14:40:00-05:00
|
date: 2018-10-17T14:40:00-05:00
|
||||||
---
|
---
|
||||||
|
|
||||||
|
44
getContent.ts
Normal file
44
getContent.ts
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
// Fetches website content via RMB and creates content directory,
|
||||||
|
// from which the static website is generated
|
||||||
|
|
||||||
|
import { HTTPMessageBusClient } from "ts-rmb-http-client";
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const dstNodeId = 4;
|
||||||
|
|
||||||
|
async function deploy() {
|
||||||
|
try {
|
||||||
|
// must find way to get twinId and proxyUrl
|
||||||
|
// perhaps use getMyTwinId @ grid3_client_ts/src/clients/tf-grid/twins.ts
|
||||||
|
const rmb = new HTTPMessageBusClient(0, "https://gridproxy.test.grid.tf", "https://graphql.dev.grid.tf/graphql", "<mnemonics>");
|
||||||
|
const msg = rmb.prepare("zos.statistics.get", [dstNodeId], 0, 2);
|
||||||
|
const retMsg = await rmb.send(msg, "{'test':'test'}");
|
||||||
|
const result = await rmb.read(retMsg);
|
||||||
|
console.log(`the read response is:`);
|
||||||
|
console.log(result);
|
||||||
|
} catch(err) {
|
||||||
|
// fails at node/httpClient.js:142 when signing
|
||||||
|
// or cannot verify signature at node/httpClient.js:167 when provided mnemonics
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
deploy();
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
|
|
||||||
|
/* Once content .md files can be fetched using RMB, this will auto build the content dir.
|
||||||
|
|
||||||
|
const fs = require("fs")
|
||||||
|
const initDir = 'content'
|
||||||
|
const initMDFile = 'content/_index.md'
|
||||||
|
const initValue = ``
|
||||||
|
|
||||||
|
if(!fs.existsSync(initDir)) {
|
||||||
|
fs.mkdirSync(initDir)
|
||||||
|
}
|
||||||
|
if(!fs.existsSync(initMDFile)) {
|
||||||
|
fs.writeFileSync(initMDFile, initValue)
|
||||||
|
}
|
||||||
|
*/
|
1031
package-lock.json
generated
1031
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rimraf public && rimraf static/css",
|
"clean": "rimraf public && rimraf static/css",
|
||||||
"initcss": "node initcss.js",
|
"initcss": "node initcss.js",
|
||||||
|
"getContent": "node getContent.ts",
|
||||||
"start": "TAILWIND_MODE=watch NODE_ENV=development npm-run-all clean initcss --parallel dev:*",
|
"start": "TAILWIND_MODE=watch NODE_ENV=development npm-run-all clean initcss --parallel dev:*",
|
||||||
"dev:postcss": "postcss css/index.css -o ./static/css/index.css --config ./postcss.config.js -w",
|
"dev:postcss": "postcss css/index.css -o ./static/css/index.css --config ./postcss.config.js -w",
|
||||||
"dev:serve": "zola serve",
|
"dev:serve": "zola serve",
|
||||||
@ -29,6 +30,11 @@
|
|||||||
"postcss-import": "^14.0.2",
|
"postcss-import": "^14.0.2",
|
||||||
"postcss-nesting": "^8.0.1",
|
"postcss-nesting": "^8.0.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"tailwindcss": "^2.2.19"
|
"tailwindcss": "^2.2.19",
|
||||||
|
"ts-rmb-http-client": "^1.0.3",
|
||||||
|
"typescript": "^4.5.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ts-rmb-http-client": "^1.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
static/images/threefold_blog.png
Normal file
BIN
static/images/threefold_blog.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 294 KiB |
5
tsconfig.json
Normal file
5
tsconfig.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"esModuleInterop": true,
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user