Example repository for creating a bookmarking app using FaunaDB, Netlify and 11ty
This repository corresponds to an article on creating your very own bookmarking site with the power of FaunaDB, 11ty and Netlify. When the article is published, I'll update with a link.
If you want this for your own, there are a few things you'll need to do, first, deploy this repo to Netlify with the button below (what this does: Forks the repository and then deploys that forked repository to your Netlify account)
npm install -g netlify-cli
npm install
netlify dev
Seriously, that should be all it takes
The site files live in the /src
directory. This is where 11ty will build the site from. It will publish the files to /app
.
The Lambda Function lives in /lambda
. The main functions doing the heavy lifting are in /lambda/bookmarks/create.js
.
In the article, I discuss setting up an iOS Shortcut to post to our netlify function (which should live at http://siteurl.com/.netlify/functions/bookmarks
).
To add a bookmark you send a request with a query parameter structured like this:
http://siteurl.com/.netlify/functions/bookmarks?url=http://google.com&apiKey=your-api-key
The article will show you the steps to create the iOS shortcut, but you could also make a small JavaScript bookmarklet to do the same thing.