-
Context:
I haven’t got a clue how I got here and how to get unstuck and repair it.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
In a clean installation ( import { html } from "htl";
export const outliner =
({ columns = 2 } = {}) =>
(tree = {}) =>
// `hoi`; // this works
html`hoi`; // this gives “Node is not defined” or “document is not defined”.
export const outline = outliner({})({});
export default {
title: "Aarde",
// pages,
head: '<link rel="icon" href="observable.png" type="image/png" sizes="32x32">',
root: "src",
style: "style.css",
footer: ({ path }) =>
`Built with <a href="https://observablehq.com/">Observable</a> – <a href="https://github.com/Martien/aarde/blob/main/src/${path}.md?plain=1">view source</a> – <a href="./evolver">view site’s evolution</a>`,
// markdownIt,
}; then
It seems to have to do with I also sometimes get If I use `hoi` I cannot get my head around this. Please help. |
Beta Was this translation helpful? Give feedback.
It's definitely not trivial.
There is code that runs “server-side”, and is used to produce files (HTML5 in the general sense of HTML, CSS, JavaScript, and supporting data files).
Those files, in turn, include code that runs in the browser.
The code that runs server-side does not have a
document
, and anything it outputs will be “serialized to disk” during the build process — in other words represented as files. This is typically using nodejs, but nodejs can spawn other programmes (data loaders, page loaders) so you can write this stuff in pretty much any language you want. You can also write some code in typescript, and it will be transpiled to JavaScript so that it can run in the browser.T…