Working, but no longer maintained [July 2022]
You can now use the Landing Pages Plugin to run a blog with Discourse . Set a category to be your blog, and the first post of every topic in that category will have its own blog page, and appear on a blog post list page.
This project has been a joint effort between @meghna and myself. All of the nice design work is hers. If you like the design of this blog make sure to check our her Discourse Themes. Any bugs you find in the functionality are mine
Get the code
Landing Pages Plugin
Blog Landing Pages
Blog Landing Theme
See it in action
Please note that all content on the blog and displayed in screenshots in this post is from The Conversation, and used under the Creative Commons License used by that site. All content belongs to its original authors and is used for demonstration purposes only.
How to set it up
Follow these steps in order
- Install the Landing Pages Plugin (how to install a plugin in Discourse).
- Install the Blog Landing Theme, (how to install a theme in Discourse).
- Set up the Blog Landing Pages as your landing pages repository.
- In the Landing Pages Administration UI change the category of the âBlogâ page to whatever category you want to use to run your blog.
Thatâs it! The first post of every topic in that category will now be posts on your blog
Restrict posting to contributors
Youâll probably want to restrict posting in that category to a group of blog contributors. If youâre not sure how to do that, hereâs a quick guide
- Create a user group, e.g. âContributorsâ, by going to /groups and clicking âNew Groupâ
- Add users to the group (âAdd Membersâ in the top right)
- In the blog category âSecurityâ settings remove the âCreateâ permission from âEveryoneâ, and add your Contributors group
Now only your contributors can post on your blog, but everyone can comment on posts.
What makes this different from other blog solutions?
Thereâs some great existing solutions to running a blog inside or alongside Discourse, including
- The great WP Discourse Plugin
- The slick Blog Post Theme
This is a bit different as itâs an entirely seperate set of pages that are not part of the Discourse client app, but it still uses the same server. This gives you a few advantages over running a seperate blog (e.g. on Wordpress), or using a Discourse category directly (e.g. with a theme component), including
- You can create content and let users reply in Discourse, but have a dedicated blog environment for reading and sharing. Readers of your blog will feel like theyâre reading a blog instead of a forum post.
- You have a single user account system (Discourseâs)
- You can use Discourse groups to restrict access to the blog
- You can make Discourse posts appear as comments on your blog with no additional setup
- You get nice responsive blog theme out of the box
- You only have to set up, and pay for, one server
- The blog doesnât need to load your forum to work, so it can load quickly
- You can easily keep your blog pages (and theme) in version control
- You get a nicely formatted New Blog Post notification email (see below)
- You can easily manage it alongside any other landing pages you need using the Landing Pages Plugin.
However, while the Blog Landing Pages have some clear advantages, they arenât going to be the best community blog solution for everyone. You should test out the different solutions and see which one works for you.
What does it mean to âSubscribeâ to the blog?
If youâre logged in and click the âSubscribeâ button youâll see a modal (if youâre logged out youâll be redirected to Discourse login)
If youâve checked the box next to âSubscribe to [site name]'s postsâ and submitted the form, youâll automatically be set to âWatching First Postâ for the blog category. That means youâll get an email notification every time thereâs a new post in that category, like you would if you were subscribed to a blog!
You can also set your notifications for the blog category to âWatching First Postâ in the normal way (in Discourse) and that will have the same effect. âWatchingâ the category (were you get an email for every post, including replies), also counts as being subscribed.
The email notifications for a blog category are a bit special. Firstly, unless you made the post yourself, youâll always get an email notification if youâre subscribed, even if you visited the site recently. Secondly, theyâre designed to look like a blog post email
We plan to allow a site admin to edit the blog post email html in the Landing Pages Administration UI in the near future. Note that if youâre âWatchingâ the blog category, only the email notification for the first post in each topic will be different. Notifications for replies will look like normal Discourse notifications.
Beyond blogging
You can use the functionality described above to create a set of landing pages for any content, like how Wordpress is a blogging engine that you can use for displaying other (non-blog) types of content. You could use a category to manage a set of products, places or people, and automatically get both a landing page and a discussion topic for the content, just by making a single post in Discourse.
Any developer who knows a bit of Ruby on Rails could achieve any of those additional use cases using this system. You donât need to know how Discourse works. As these blog pages are part of the landing pages plugin, you also get access to all the existing templates in that plugin, including contact forms, header, footer, topic lists and user profiles. You can read more about these templates, and others, in the plugin documentation.