Is there an option on Ghost to email subscribers without publishing a post? Sometimes my post are too long with many specifications and I would like to email a short summary with a link to the post attached. Is this doable from Ghost or I need to use a third party integration? Any recommendations for a service to integrate?
Hey @Special_K
You can certainly do this directly in Ghost using custom collections. In this example in our docs a new custom collection is being made that puts all members only newsletters into itâs own collection, leaving the blog home page with only public posts:
If you want all your posts to be public you could use a tag instead like so:
collections:
/:
permalink: /{slug}/
template: index
filter: tag:-newsletter
/newsletter/:
permalink: /{slug}/
template: index
filter: tag:newsletter
In the above example the routes file is taking any post tagged with ânewsletterâ and placing them in a â/newsletter/â sub page of the site. Again this will leave your main blog free of your emailed posts.
I am considering abandoning traditional newsletter software for Ghost natively, but this was one of the things holding me back - I donât want the entire post emailed to folks - they prefer a snippet with a few other things.
Just to confirm, though:
Creating this collection solves the issue of sending the native post - I can create a shorter article, tag it with newsletter, and email that out.
Will things in /newsletter/ show up via RSS for the normal blog? Some subscribe that way as well, and it would be annoying to get one entry for the full post, and a second for a newsletter post.
@stevemitchell weâve helped you with this query via Ghost(Pro) support, but I will share an overview here for others to learn from.
A content collection is the best way to deliver as emails but not publish them on your site. But Iâd recommend using an internal tag for this, rather than a regular tag. Hereâs an example:
collections:
/:
permalink: /{slug}/
template: index
filter: tag:-hash-newsletter
/newsletter/:
permalink: /{slug}/
template: index
filter: tag:hash-newsletter
This would allow you to use a tag of #newsletter for any posts which will be delivered as an email, but not published on your site.
Using an internal tag is important because Ghost wonât automatically generate a tag archive for /tag/newsletter/
If you have more content collections other than / youâll need to filter out the #newsletter tag on each collection
The benefit of doing it this way is that if your readers click on the âView onlineâ link from the email, they will be directed to a page that works. But this will be the only way to navigate to that page.
De-indexing your newsletter collection
One further step Iâd advise is to deindex your entire newsletter collection in the robots.txt so the search engines donât pick it up.
In this example youâd include: Disallow: /newsletter/*
in your robots.txt and add this file to the root directory of your theme.
I was sitting there trying to workout how to do this, thanks @jackdaniel for pointing out that there is now a drop down option on the publish post button in the top right of the post page. This opens up some interesting use cases for the API.
Thank YOU for this, with all my heart. I have five projects in Ghost right now, and every day I discover a new improvement.
The way I can now send newsletter without any bothering of external programs makes it so easy that I can keep myself more concentrated in the important part, which is creating good content, THANKS!
This native feature looks great! Do you still recommend tagging the newsletters, for example if you had a use case where you can view past ânewslettersâ via url domain.com/newsletter