Skip to content

Choose your way of working ​

There are two ways to change the site: edit the pages in the HTML folder by hand, or edit the SOURCE toolkit and build the pages from it. Pick one before your first edit, because the two do not mix.

Key point: the toolkit's build, npm run build, writes every page and three stylesheets into the HTML folder: css/main.css, css/vendor.css and css/components.css. A page or one of those stylesheets you changed by hand is overwritten without a warning.

Which way for what ​

What you want to changeBy hand in HTML/Built from SOURCE/
A text, a link or a picture on one pageEdit the pageEdit the page's data in src/data/pages/, then build
The menu, the logo or the footer on every pageSearch and replace across the pages, see Edit every page at onceEdit src/data/site.json once, then build
A new project or postCopy a page and add it everywhere it is listed, see Add a projectA record in src/data/projects.json or posts.json and a page in src/pages/, then build
The order of a page's sectionsMove the <section> in the pageMove it in the page's file in src/pages/, then build
Colours, type and spacingcss/variables.css, either way
Fontscss/fonts.css, either way
Your own stylescss/custom.css, either way
Settings, your own scripts, the contact formjs/config.js, js/custom.js, mail.php, either way
A component's default look, the schemes, the type classesOverride them in css/custom.cssEdit the Sass in src/styles/ or packages/, then build

The files marked "either way" are never touched by a build, so you edit them the same in both: css/variables.css, css/fonts.css, css/custom.css, js/config.js, js/custom.js, mail.php and your pictures in assets/.

Working by hand ​

Choose this if you edit HTML and CSS and want no tools beyond your editor. You change exactly the file a visitor gets, and you see the result on reload. The price is repetition: the header, the burger menu and the footer are written into every page, so a change to them is a search and replace across files. Every other page of this documentation is written for this way.

Building from SOURCE ​

Choose this if you are at home with a terminal and Node.js, and expect to change the menu, the projects or the posts often. Each of them lives in one data file, and a build writes it into all the pages. From then on, the pages and the three stylesheets in the HTML folder are output: never edit them by hand again. Setup and commands: SOURCE toolkit.

Switching later

You can start by hand and switch to the toolkit later, but the toolkit does not read your edited pages: it rebuilds them from its own data. Carry your changes into SOURCE/src first, or the build replaces them.

With your way chosen, the first thing most sites change is the header, menu and footer of every page: Edit every page at once.