1
0
Template-based static site generator with support for dynamically defined content. Ideal for static website hosts like Neocities or simple HTTP servers like Apache, without needing to rebuild entire sites or copy-paste HTML templates for something like a typo on a blog post.
Go to file
Lightling b0119c61d7
cms-to-static updates
- tags are no longer in media-list, remove from default params
- rename existing list directory to the current time as a backup
- add sorting option
2024-11-13 21:20:17 -05:00
.vscode init 2024-03-10 01:35:31 -05:00
docs rename sites to manager 2024-11-06 17:14:31 -05:00
libs cleanup, docs, etc. 2024-11-04 19:25:14 -05:00
projects cms-to-static updates 2024-11-13 21:20:17 -05:00
.editorconfig init 2024-03-10 01:35:31 -05:00
.gitignore rename sites to manager 2024-11-06 17:14:31 -05:00
.nvmrc update node 2024-05-17 17:17:26 -04:00
package-lock.json rename sites to manager 2024-11-06 17:14:31 -05:00
package.json tweaks to get builds going 2024-10-18 20:42:25 -04:00
README.md rename sites to manager 2024-11-06 17:14:31 -05:00
tsconfig.json convert frontend to workspace 2024-05-02 17:41:51 -04:00
tsconfig.node.json init 2024-03-10 01:35:31 -05:00

Project Mackenzii

This repo holds the various projects associated with @goldenwere/mackenzii, a template-based static site generator aimed at splitting dynamic site content from fixed site code.

Local Development

These instructions will try to be as thorough as possible and/or link to necessary references as much as possible in order for those who may not be used to this sort of development environment.

Git

While you could simply download the source code directly and work with it without git, it would be easier to pull updates to mackenzii by installing git on your machine. When git is installed, open a terminal and enter the command git clone <repo url> <directory to clone to>, e.g. git clone https://git.goldenwere.com/Goldenwere/mackenzii.git /home/me/mackenzii.

Node / NPM

Make sure you have node installed on your machine. The best way to manage node is to use nvm (windows version). This project uses .nvmrc to inform nvm of the targeted (ideal) version to use. Running nvm install {version-in-nvmrc} will install the appropriate version, and running nvm use in every terminal session will keep node in sync with .nvmrc (if the version is not installed, nvm will tell you what version to install). Once node is installed, run npm ci in a terminal to install the dependencies used by the project.

Managing content

At the minimum, you will need at least one site directory under /projects/manager/sites/<my-site-name> with a config.json file with the required fields set at the root of that directory in order to preview and build your site(s). Run npm run set-current -w=manager --site=<my-site-name>, where <my-site-name> matches the name of the folder in /projects/manager/sites, in order to set the site you are currently working with. You can have multiple sites in this directory and swap between them with npm run set-current.

Live Preview

You can run npm start in the terminal to spin up a server. Open the address shown the terminal in your browser to preview what your site looks like. It has hot reloading, which means you can make changes to site code and certain files that will be instantly reflected on the page you have open. Some more core files may cause the page to fully reload, while some simple changes like stylesheet/component changes may be reflected without full reloading. Note that fetched content (page markdown/config files) is not caught by hot reload, so you will need to reload manually in those cases.

Building

Running npm run build will build out the project. Be sure that you had previously set npm run set-current -w=manager --site=<site-name> before building so that the site builder can build from config.json. When the build command is executed, vite-ssg will build the frontend into the /projects/frontend/dist folder. The build process will ensure that the previously set site is copied into the generated dist directory. The dist directory contains your static site's files. Note that if you run npm run set-current after a build with a different site from that build, you should re-run npm run build as well.