Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brob/netlify-shortcut-statuses
An example of Netlify Lambda Functions that interact with a Shortcuts widget on iOS (or any other automation programming)
https://github.com/brob/netlify-shortcut-statuses
gulp-tasks jamstack lambda-functions netlify-functions nodejs static-site
Last synced: about 6 hours ago
JSON representation
An example of Netlify Lambda Functions that interact with a Shortcuts widget on iOS (or any other automation programming)
- Host: GitHub
- URL: https://github.com/brob/netlify-shortcut-statuses
- Owner: brob
- Created: 2018-10-02T18:20:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:25:01.000Z (11 months ago)
- Last Synced: 2024-04-11T15:46:40.030Z (7 months ago)
- Topics: gulp-tasks, jamstack, lambda-functions, netlify-functions, nodejs, static-site
- Language: JavaScript
- Homepage:
- Size: 4.18 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Netlify Function and Build
This repository is the cleaned version of a Netlify function and build process that accepts a request from an iOS Shortcut and processes it via a netlify form to create a list of status updates from data in a static site generator.
You can view a completed version at [bryanlrobinson.com/bryan-sight](https://bryanlrobinson.com/bryan-sight)
You can read the [blog post here](https://bryanlrobinson.com/blog/2018/11/12/ios-shortcuts-pushing-data-to-netlify-static-site/)
## Requirements
- Currently set up to deploy to [Netlify](https://netlify.com)
- Needs 3 environment variables:
- STATUS_FORM_ID (form ID from netlify; navigate to the form in Netlify and grab the last piece of the URL)
- POST_FORM (form action: any page on the site where the form exists; this should be a full URL including protocol)
- FORM_NAME (the name of the form in your form-stub; by default this is `netlify-shortcut-demo`)
- API_AUTH (your netlify api auth key)
- Imgur account (for iOS shortcut integration and photo uploading)
- Static Site Generator that can accept a JSON file (Jekyll uses _data/data.json)## Installation
1. Clone/fork the repo and publish to Netlify (or click the one-click button below... thanks Phil!)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/brob/netlify-shortcut-statuses)
2. Create Environment Variables listed above
3. Set up a "Deploy Hook" to rebuild the site and deploy
4. Add a "Notification" to the form to trigger the deploy hook created in 2
5. Manually trigger a build to populate your environment variables into your Lambda Function
6. Submit a query to `/.netlify/functions/update-status/?doing=&imgUrl=`This is mostly meant as a proof of concept and to be extended in other ways. Feel free to fork and use it for all sorts of crazy dynamically static stuff!