Git Product home page Git Product logo

travisbriggs.com's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.