Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for a newsletter #2517

Merged
merged 11 commits into from
Jun 19, 2024
Merged

Conversation

asboyer
Copy link
Contributor

@asboyer asboyer commented Jun 18, 2024

In reference to idea: #2097
In reference to request: #923 (comment)

Added support to integrate a 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.

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.

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

image

Light version

image
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

image

image

Footer not fixed

image

image
To clarify, if footer isn't fixed, the email signup will appear on every page.

@asboyer
Copy link
Contributor Author

asboyer commented Jun 18, 2024

Also, can someone mark this as an enhancement/feature? I don't think I have the ability to tag this PR as anything.

@george-gca
Copy link
Collaborator

This looks really nice. As for the background of the light version, I believe it is best to set to white for readability, or maybe a light gray as long at it doesn't look like a disabled element.

@asboyer
Copy link
Contributor Author

asboyer commented Jun 19, 2024

Okay, this is how it looks like in light mode now:

Dormant

image

Active

image

@george-gca george-gca merged commit 0ac9e44 into alshedivat:master Jun 19, 2024
3 checks passed
@george-gca
Copy link
Collaborator

@asboyer I merged your commit, but just now realized that we forgot about adding this to our README. Would you mind sending a new PR with an explanation added to CUSTOMIZE.md?

@asboyer
Copy link
Contributor Author

asboyer commented Jun 19, 2024

@asboyer I merged your commit, but just now realized that we forgot about adding this to our README. Would you mind sending a new PR with an explanation added to CUSTOMIZE.md?

Yes, I'll whip that up now.

asboyer added a commit to asboyer/al-folio that referenced this pull request Jun 19, 2024
george-gca pushed a commit that referenced this pull request Jun 20, 2024
ngmarchant pushed a commit to ngmarchant/ngmarchant.github.io that referenced this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants