Skip to content

Instantly share code, notes, and snippets.

@andrewstiefel
andrewstiefel / feed.xml
Created January 24, 2022 18:43
Simple XSL boilerplate for styling Atom feeds in Jekyll
---
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/feed.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }}</title>
<link href="{{ site.url }}{{ site.baseurl }}/feed.xml" rel="self"/>
<link href="{{ site.url }}{{ site.baseurl }}/" rel="alternate"/>
@andrewstiefel
andrewstiefel / convertkit-subscribe.js
Created May 25, 2020 19:40
Netlify function to add subscribers to ConvertKit
const fetch = require("node-fetch");
const apiKey = process.env.CONVERTKIT_API_KEY;
const apiFormURL = process.env.CONVERTKIT_NEWSLETTER_FORM;
exports.handler = async (event, context) => {
const email = event.queryStringParameters.email || "Oops, no email";
const data = {
api_key: apiKey,
email: email,
};