Skip to content

The personal website/blog of David Molina. Built using Jekyll and GitHub Pages.

Notifications You must be signed in to change notification settings

davidmolina/davidmolina.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

366 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the repository for my personal site https://davidcmolina.com. I’m using Jekyll with GitHub Pages for easy building and storing. I used to blog with WordPress and Posterous, and I've posted once on Medium, but this is where I put all my stuff.

A quick note

I'm a self-taught developer, and learn by doing. Literally. If you see something here that doesn't make sense, open an issue on GitHub.

A special thanks

A special thanks to Chris Hough (@chrishough), Fernando Paredes (@nanoxd), Nell Shamrell (@nellshamrell), Jared Koumentis (@shepbook) for their patience, hacking w/ me and showing me the ropes, encouragement, and hack.hands mentor extraordinaire, Allen Wyma for his software mentorship. Never forgetting where I come from, I'm paying it forward at Operation Code helping service members, veterans and military families get coding.

Email subscribe (SendGrid + external endpoint)

This repo includes:

  • A top navigation Subscribe RSS link
  • A footer email subscribe form
  • A serverless endpoint template at netlify/functions/subscribe.js you can adapt to your platform

Required environment variables

Configure these in your serverless provider secret manager:

  • SENDGRID_API_KEY (full API key, never commit to git)
  • SENDGRID_LIST_ID (Marketing list ID to place subscribers into)
  • SUBSCRIBE_ALLOWED_ORIGIN (set to https://davidcmolina.com)
  • Optional for broadcast flow: SENDGRID_FROM_EMAIL, SENDGRID_REPLY_TO

Secure setup checklist

  1. In SendGrid, create a dedicated API key with the minimum scopes needed for Marketing Contacts.
  2. In SendGrid, create or select the target marketing list and copy its list ID.
  3. Deploy your endpoint on a platform that supports server-side code (for example: Cloudflare Workers, Vercel Functions, AWS Lambda/API Gateway, Render, Fly.io).
  4. Set SENDGRID_API_KEY and SENDGRID_LIST_ID as environment variables in that platform.
  5. Set _config.yml subscribe_endpoint to your deployed endpoint URL.
  6. If subscribe_endpoint is empty, only RSS subscribe is shown.

Cloudflare Worker secret commands

If you deploy the endpoint with Cloudflare Workers:

wrangler secret put SENDGRID_API_KEY
wrangler secret put SENDGRID_LIST_ID
wrangler secret put SUBSCRIBE_ALLOWED_ORIGIN
wrangler secret put SENDGRID_FROM_EMAIL
wrangler secret put SENDGRID_REPLY_TO

Local test

Run Jekyll as usual for the static site, and test the subscribe form against your deployed endpoint URL. GitHub Pages only serves static files and does not execute server functions.

License

Content: Creative Commons, BYd-NC-SA

Code: MIT

About

The personal website/blog of David Molina. Built using Jekyll and GitHub Pages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors