Skip to content

Commit 39aedc6

Browse files
committed
Update readme.md and index.html
1 parent 7a7ad8f commit 39aedc6

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ npm install -g netlify-cli
3030
netlify dev
3131
```
3232

33+
## Create an environment variable
34+
You must create and add your [Buttondown API key](https://buttondown.email/settings) as an [environment variable](https://docs.netlify.com/environment-variables/overview/) for your Netlify site before the serverless function will work.
35+
3336
## License
3437
[MIT License](/LICENSE)

public/index.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@ <h1>Buttondown and Netlify Functions Demo</h1>
1414
<p>
1515
This is an example of a custom HTML subscription form that uses a <a target="_blank" href="https://docs.netlify.com/functions/overview/">Netlify Function</a> and the <a target="_blank" href="https://docs.buttondown.email/api-reference/introduction">Buttondown API</a> to add a subscriber to an email newsletter.
1616
</p>
17+
<p>
18+
This is not a working example. Clone this repository and deploy it to Netlify to try it out yourself.
19+
</p>
1720
<form name="newsletter" method="POST" action="/success/" netlify-honeypot="bot-field" data-netlify="true">
1821
<label class="hidden">Don’t fill this out if you’re human:</label>
1922
<input class="hidden" name="bot-field" />
2023
<label for="email">Your Email Address:</label>
2124
<input type="email" name="email"/>
2225
<button type="submit">Subscribe</button>
2326
</form>
24-
<h2>More information</h2>
25-
<ul>
26-
<li><a target="_blank" href="https://buttondown.email/">About Buttondown</a></li>
27-
<li><a target="_blank" href="https://www.netlify.com/">About Netlify</a></li>
28-
<li><a target="_blank" href="https://buttondown.email/blog">Tutorial Blog</a></li>
29-
<li><a target="_blank" href="https://github.com/andrewstiefel/buttondown-netlify-function">GitHub Repo</a></li>
30-
</ul>
3127
<h2>Deploy your own</h2>
3228
<p>
3329
A great place to start is to clone and deploy your own copy of this example. You can do that by clicking the button below.
@@ -38,6 +34,13 @@ <h2>Deploy your own</h2>
3834
Clicking the button will clone <a target="_blank" href="https://github.com/andrewstiefel/buttondown-netlify-function">this repo</a> and deploy it as a new site on <a target="_blank" href="https://netlify.com">Netlify</a>
3935
</small>
4036
</p>
37+
<h2>More information</h2>
38+
<ul>
39+
<li><a target="_blank" href="https://buttondown.email/blog">Tutorial Blog</a></li>
40+
<li><a target="_blank" href="https://github.com/andrewstiefel/buttondown-netlify-function">GitHub Repo</a></li>
41+
<li><a target="_blank" href="https://buttondown.email/">About Buttondown</a></li>
42+
<li><a target="_blank" href="https://www.netlify.com/">About Netlify</a></li>
43+
</ul>
4144
</div>
4245
</body>
4346

0 commit comments

Comments
 (0)