In reference to idea: https://github.com/alshedivat/al-folio/discussions/2097 In reference to request: https://github.com/alshedivat/al-folio/issues/923#issuecomment-2171924663 Added support to integrate a [loops.so](https://loops.so/) mailing list into the site. To use, you need to enable `newsletter` in `_config.yml`. You also must specify a loops endpoint (although I think any mailing list endpoint can work), which you can get when you set up a mailing list on loops. More documentation on loops: [here](https://loops.so/docs/forms/custom-form). Once that is enabled, the behavior is different depending on how you specified your footer to behave in `_config.yml`. If `footer_fixed: true`, then the sign up will appear at the bottom of the about page, as well as at the bottom of blog posts, if you enable `related_posts`. If `footer_fixed: false`, then the newsletter signup will be in the footer (on every page), like it is in on [my website](https://asboyer.com). I'm not attached to the placement of the signup, and you can choose to include it wherever you want with `{% include scripts/newsletter.liquid %}`. Also if you include positional variables into that, you can choose how you center the signup. So `{% include scripts/newsletter.liquid left=true %}` positions the signup bar to the left. Here are some screenshots below: ## Dark version  ## Light version  I think the input field color should probably change to maybe be light for both themes? What do you think? I think the dark background looks cool, but I don't usually see that done like that on other sites. ## Footer fixed   ## Footer not fixed   To clarify, if footer isn't fixed, the email signup will appear on every page. --------- Co-authored-by: George <31376482+george-gca@users.noreply.github.com>
23 lines
903 B
Plaintext
23 lines
903 B
Plaintext
{% assign have_related_posts = false %}
|
|
{% for post in site.related_posts | limit: site.related_blog_posts.max_related %}
|
|
{% unless have_related_posts %}
|
|
{% assign have_related_posts = true %}
|
|
<br>
|
|
<hr>
|
|
<br>
|
|
<ul class="list-disc pl-8"></ul>
|
|
|
|
<!-- Adds related posts to the end of an article -->
|
|
<h2 class="text-3xl font-semibold mb-4 mt-12">Enjoy Reading This Article?</h2>
|
|
<p class="mb-2">Here are some more articles you might like to read next:</p>
|
|
{% endunless %}
|
|
|
|
<li class="my-2">
|
|
<a class="text-pink-700 underline font-semibold hover:text-pink-800" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
{% if site.newsletter.enabled and site.footer_fixed %}
|
|
<p class="mb-2" style="margin-top: 1.5rem !important">Subscribe to be notified of future articles:</p>
|
|
{% include scripts/newsletter.liquid left=true %}
|
|
{% endif %}
|