Skip to content

SOURCE toolkit ​

SOURCE/ beside the HTML folder holds what the pages and three of the stylesheets are built from: the pages as TSX, their content as JSON, and the Sass. Its build writes the pages into the HTML folder, so a menu item, a project or a colour scheme is changed once in SOURCE/ instead of in 61 pages. You need it only if you chose to work this way: Choose your way of working. Its own guide is SOURCE/README.md.

How to access ​

SOURCE/ → a terminal open in it

The toolkit needs Node.js 22.18 or later, which comes with npm. Check with node -v.

Installing ​

Install the build tools once:

sh
npm install

Working with the dev server ​

sh
npm run dev
  ➜  Local:   http://127.0.0.1:3000/

Open that address. The dev server renders each page from SOURCE/ when the browser asks for it, and reloads the browser when you save a page, a data file or a Sass file. It writes nothing into the HTML folder: the pages there stay as they were until you build. Stop it with Ctrl+C.

Building into the HTML folder ​

sh
npm run build
Built 61 pages and 3 stylesheets into …/HTML

The build writes over these files in the HTML folder, whatever they hold, and leaves everything else:

Written by every buildLeft as they are
Every page, one per file in src/pages/css/variables.css, css/fonts.css, css/custom.css
css/main.css, css/vendor.css, css/components.cssjs/config.js, js/custom.js, the scripts, components/
mail.php, assets/ and a page that has no file in src/pages/

So an edit made by hand to a page or to one of the three stylesheets is gone after the next build. A page you deleted from the HTML folder comes back, unless you delete its file in src/pages/ too. A page you added by hand, with no file in src/pages/, stays, but the build knows nothing of it: its menus are not updated with the others.

Before the first build

The toolkit builds the pages of the download. If you have already changed pages by hand, carry those changes into SOURCE/src first, or the first build replaces them.

What is in SOURCE/, and where a change goes: Pages and data and Sass.

Next: Pages and data.