Skip to content

audiodude/travisbriggs.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digital Garden of Travis Briggs

This is the static site generator that creates the digital gardens at:

https://travisbriggs.com

gemini://gem.travisbriggs.com

Background

A Digital Garden is like a blog, as it's a place to share personal thoughts, projects and other things on the web (or on Gemini). However it differs in that it is setup more as a graph of nodes that are connected and evergreen instead of a dreaded reverse chronological ordering of "posts". For more information on Digital Gardens, see the post that inspired me by Maggie Appleton.

This static site generator is built off the awesome template Eleventy Garden by Binyamin Aron Green. That in turn uses the awesome Eleventy static site generator, which is more or less a clone of Jekyll in Javascript that winds up being more flexibile and more easily extensible.

Developing

npm install
npm start

Deploying

www

First, build the site. Warning: this will create a Mastodon post for every new garden node, assuming you have a MASTODON_API_KEY entry in a top-level .env file.

npm run build

Next deploy to Netlify (--prod to skip the preview step):

netlify deploy --prod -d _site

Finally, commit the code and push to Github (left to the reader). It's important that this step is last, because the comments.sqlite3 (where the Mastodon ids for node comments live) database is commited as part of the repo, and will be out of date if the repo is pushed before deploying.

Gemini

The Gemini capsule is hosted from a server on Digital Ocean using the excellent Twins server and certificates from Let's Encrypt. To deploy the Gemini site, run:

GEM_USER=username GEM_HOST=some.site.garden.example.com npm run deploy-gemini

This will run Eleventy in Gemini mode, create a tarball, upload it to the remote host, and extract it to the necessary directory.

Recreating the comments database

If you're in this section, I'm sad for you. You probably want to first delete all existing comments. Then run:

node create_comments_db.js

Finally, follow the build and deploy steps above.