# 在另一个网站中嵌入分类帖子和子分类

**URL:** https://meta.discourse.org/t/embed-category-posts-and-subcategories-in-another-website/128110
**Category:** Support
**Created:** [2019年九月9日 23:50 UTC](https://meta.discourse.org/t/embed-category-posts-and-subcategories-in-another-website/128110 "2019-09-09T23:50:01Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2019年九月10日 20:06 UTC](https://meta.discourse.org/t/embed-category-posts-and-subcategories-in-another-website/128110/2 "2019-09-10T20:06:44Z")

</div>

听起来您正在寻找这个：

> [@Embedding a list of Discourse Topics in another site](https://meta.discourse.org/t/embedding-a-list-of-discourse-topics-in-another-site/125911):
>
> If you grab the latest builds of Discourse you’ll get a [the ability to embed topic lists](https://github.com/discourse/discourse/commit/23367e79ea735598766ec6f507f6132e0bad3dba) in other sites via some simple Javascript and HTML. The typical use case for this is a blog or other content driven site, where you want a widget on the side of the screen that lists topics. You can filter by category, tag, or [any of the other public](https://github.com/discourse/discourse/blob/master/lib/topic_query.rb#L51-L73) filter options available. How to Embed a list of Topics First, you must enable the embed topics list site setting. Then, in your HTML add a \<script\> tag that…

那里有一个按类别嵌入主题列表的示例。

---

_[View the full topic](https://meta.discourse.org/t/embed-category-posts-and-subcategories-in-another-website/128110)._
