Cloning This Webiste
Created: 28th of December 2025
Updated: 30th of November 2026
A quick guide for cloning this site's repository via git & getting set up for development on a new system. I use Eleventy (11ty) as a static site generator & Airtable as a sort of a CMS solution. This documentation will walk through cloning this website's repository from GitHub, installing all required dependencies, insuring all NPM plugins are installed, and testing to ensure that the new machine is ready for further development.
Install Required Packages
#### Arch
sudo pacman -Syu git nodejs npm
#### Fedora
sudo dnf upgrade && sudo dnf install git nodejs npm
#### Ubuntu
sudo apt update && sudo apt upgrade; curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - && sudo apt install -y nodejs; sudo apt install git npm
#### Free BSD
su -c "pkg update && pkg upgrade && pkg install git node npm"
Clone the Site's Repository
- Navigate to a suitable location, typically I will use a ~/Documents folder
- Clone the site from GitHub either via HTTPS or SSH:
git clone git@github.com:makccr/makc.co
or
git clone https://github.com/makccr/makc.co
Install 11ty & Required Plugins
npm install
Or, to install the specific versions currently in use, stored in `package-lock.json':
npm ci
Verify the New Instance is Ready for Development
The easiest way to verify that everything is working properly, is simply to attempt to compile and serve the eleventy site:
npx @11ty/eleventy --serve
Deploying the Site
If all went well, a local version of the site can now be reached at http://localhost:8080 in any web browser. So long as this command is running the site will continually recompile as changes are made. You can also manually compile the site with:
npx @11ty/eleventy
Note: It is important to make sure that npx @11ty/eleventy & npx @11ty/eleventy --serve are used in their proper place:
@11ty/eleventy: Used to fully build the site before deployment--serve: Used for development, and will update changes made to site files in the root directory on the fly.
The standard build command can be interfered with, if --serve is running in a separate terminal, and can also just be a tad bit finicky. For this reason it is best practice to use one terminal to run all 11ty build commands, as well as any git commands that may be used during deployment. A flow that is reasonable would look something like:
- Run
npx @11ty/eleventy --servebefore beginning any development, and leave it running in it's own shell while you manipulate the site. - When ready to commit changes, kill the
--servecommand and runnpx @11ty/eleventyto build the site. - Add changes to staging area via
git add, commit any changes withgit commit& if ready to do so, push changes withgit push. - Before beginning new development, once again run
npx @11ty/eleventy --serveto have a live static site generated while you work.
Removing Cache and Built Site
It is sometimes necessary or ideal to remove the built site and cache from 11ty's root directory. A good example of when a refresh might be a good idea, is when assets have been removed from the site, as 11ty is not always amazing at cleaning up _site (where the live site lives). In any case, it is also ideal to occasionally remove any cache files and rebuild the site from scratch. This can be accomplished with one command:
# Run from the site's root directory
rm -rf .cache _site
The site can then be rebuilt from scratch with: npx @11ty/eleventy.
Branches
This site has a developlement & a master branch. Any and all development should take place on the development branch. All changes should be pushed live on the development branch as well. This branch is published to a live sub-domain at dev.makc.co.
The master branch is now used only to merge changes from active development into the live site. Breaking this chain of events can make it hard to recover without deleting one branch and starting over, so only ever make changes to the development branch and merge changes to master with:
git checkout master;
git merge development;
git push;
git checkout development
# Using this order of operations ensures that branches are never corrupted and a functining test enviroment can stay intact.
Updating NPM Packages
Obviously keeping packages up to date is a pretty important security practice. Luckily if packages are installed via npm, we can check for and install updates to 11ty packages very easily:
npx npm-check-updates -u # Checks for updates
npm install # Installs updates
npm i # Shorthand for npm install
It may also be necessary to use the npm audit command to fix any issues that arise in the update process.
