GitXplorerGitXplorer
c

11ty-decap-cms-data-list-starter

public
6 stars
0 forks
0 issues

Commits

List of commits on branch main-template.
Verified
64a2e04354facfb998fce7187b90bda8c9beba7f

add non shuffle option

cclottman committed 4 months ago
Verified
73cdba8a59402c6b71537f488a52c6ef8971a88a

add cloudflare cms setup details

cclottman committed 4 months ago
Unverified
808495fa114d6ef548e46926030ce57a1324ec32

all the things

cclottman committed 4 months ago

README

The README file for this repository.

Site

11ty

This site is built with 11ty. _site is the build output directory; it should not be committed to git and be careful not to directly modify files within _site/!! They will get overwritten on every build.

If you need some Eleventy starting pointers, Cassey has a couple blog posts: Getting your bearings in an existing 11ty project and Just Enough JavaScript for Eleventy.

CMS

The CMS to add creators without writing code or touching Github is Decap CMS. Access it at theurl.com/admin by logging in with a GitHub that's a contributor the project. functions/api is a Cloudflare serverless function to handle that authing to Github.

If you Publish a post through the CMS, that will trigger a commit to main, and will deploy the site automatically.

Set up the Decap CMS on Cloudflare Pages following the instructions for i40west/netlify-cms-cloudflare-pages. The files you need are already in the repo.

Daily builds

Site is set up to be hosted in Cloudflare. A daily cron job triggers a new build every day which is important mainly so that the item list shuffles order every day - the item at the top probably won't be at the top of the list tomorrow, and no one should get stuck at the bottom either. Remove the shuffle filter from the item list display in index.njk if you don't want this.

Builds/deploys happen automatically on pushes to main on Github. If you make a PR, you can expand the PR details to see a preview build.

Node version

.nvmrc says 18 which was chosen somewhat arbitrarily as what I had on my machine at the time, you are welcome to upgrade if needed.

Links

schedule builds in cloudflare with cron