How do you insert a newsletter subscription form on every post and page? #2
Answered
by
kaushikgopal
kaushikgopal
asked this question in
Q&A
-
I got this question from a reddit thread:
The question boils down to - how does one inject custom stuff into the footer |
Beta Was this translation helpful? Give feedback.
Answered by
kaushikgopal
Mar 22, 2021
Replies: 1 comment
-
Henry allows you to inject things into the footer via a Create a <form action="https://tinyletter.com/kaush"
class="newsletter"
method="post"
target="popupwindow"
onsubmit="window.open('https://tinyletter.com/kaush', 'popupwindow', 'scrollbars=yes,width=800,height=600');return true">
<input type="text" name="email" id="tlemail" placeholder="Enter your email address ..."/>
<input type="submit" value="Subscribe to my newsletter"/>
</form>
<!-- you probably also want to re-add the original site-nav -->
<nav class="site-nav">
<ul>
<li><a class="nav-link" href="/">posts</a></li>
<li><a class="nav-link" href="{{ site.author.bio-url }}">homepage</a></li>
<li><a class="nav-link" href="/about/">about</a></li>
<li><a class="nav-link site-title" href="{{ site.url }}/categories">categories</a></li>
<li><a class="nav-link" href="{{ site.url }}/feed.xml">rss</a></li>
</ul>
</nav> Henry already includes a style definition for the css class |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kaushikgopal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Henry allows you to inject things into the footer via a
_footer.html
file.Create a
_includes/_footer.html
file and the following content: