How to Embed Recent and Popular Topics?

AI-generated summary

Embedding Recent and Popular Topics in Another Website

Tino_Augustine is looking to embed recent and popular posts from their Discourse forum into another website. They provided an image of the desired layout.

Johani shared a link to a Meta Discourse topic that provides instructions on how to embed a list of Discourse topics in another site.

However, Tino_Augustine initially encountered issues with the iframe on their Joomla site. They provided the script they created and the error message displayed on the frontend.

After trying again, Tino_Augustine successfully embedded the topics by adding a script to the template and an HTML module to a particular position. They shared the corrected code.

Does anyone know how to embed the discourse recent and popular posts to another website?

What I am looking for is similar to the below layout can someone provide the document for embedding discourse on another site?

Have a look here

@Johani

I tried to follow the instructions on that discussion but I not able to iframe it successfully on my Joomla site.

Here is the example script which I created:

  1. Below added to the template section where I can add scripts:

<script src="https://example.com/javascripts/embed-topics.js"></script>

  1. Below added to as a HTML module to a particular position.

<d-topics-list discourse-url="https://example.com/latest"></d-topics-list>

But this is what it shows on the front end.

What I want to display on my website is the latest 5 or 10 posts from my discourse forum.

Finally managed to successfully embed using below

  1. Below added to the template section where I can add scripts:

<script src="https://example.com/javascripts/embed-topics.js"></script>

  1. Below added to as a HTML module to a particular position.

<d-topics-list discourse-url="https://example.com"></d-topics-list>