# Discourse 作为简单的个人博客引擎

**URL:** https://meta.discourse.org/t/discourse-as-a-simple-personal-blog-engine/138244
**Category:** Community Building
**Created:** [2020年一月10日 14:19 UTC](https://meta.discourse.org/t/discourse-as-a-simple-personal-blog-engine/138244 "2020-01-10T14:19:41Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [2020年一月10日 14:19 UTC](https://meta.discourse.org/t/discourse-as-a-simple-personal-blog-engine/138244/1 "2020-01-10T14:19:41Z")

</div>

我大量使用 Discourse，在我为数不多的与[健康](https://meta.discourse.org/t/check-plugin-or-theme-validity/137111)相关的[论坛](http://forum.greatnorthcarerecord.org.uk)和[开放健康枢纽](http://openhealthhub.org)中如此，当然也在我和 [thepavilion.io](http://thepavilion.io) 与 @angus、@merefield、@fzngagan、@Ellibereth 合作的工作中如此。我发现，我使用 Discourse 越多，就越能熟悉其_所有_功能、插件、主题组件以及整个生态系统。

近十年来，我一直使用 GitHub Pages 托管的静态 Jekyll 站点作为个人/工作博客。最近我决定对其进行全面改版，并尝试搭建一个 Discourse 实例作为博客。今天正是实施这一想法的理想时机，因为我_本该_在做别的事情（为求职申请重写简历），所以_显然_我需要这样一个“拖延项目”——将内容从静态站点迁移到博客等等……

效果相当不错，加上“主题列表预览”功能展示博客文章摘要后，我对结果很满意。虽然还需要一些视觉上的微调，但作为起步已经足够了。

> **[blog](https://bawmedical.co.uk/c/blog/9)**
>
> Yes, I’m using a Discourse forum as a blog engine #dogfooding

Meta 社区中有几篇帖子提到了博客，但大多涉及将 Discourse 用作静态站点的后端，或作为 WordPress 博客的评论引擎，而非将其本身作为博客引擎使用。因此，我认为值得专门撰写一篇关于这种原生博客用法的文章。

在同一博客中，我还设置了一些私密分类，用于存放笔记、参考资料以及其他我原本可能会放在 GitHub Gist 中的内容（但在这里，无需面对 Gist 那糟糕的用户界面和迟缓的交互体验）。

如果任何人有任何改进该博客的建议，或有关将 Discourse 用作博客引擎的插件/主题组件推荐，欢迎随时留言评论。

---

<div class="post-metadata">

### Author: ![Remah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/remah/32/70590_2.png) [@Remah](https://meta.discourse.org/u/Remah)
#### Post date: [2020年一月10日 14:55 UTC](https://meta.discourse.org/t/discourse-as-a-simple-personal-blog-engine/138244/2 "2020-01-10T14:55:10Z")

</div>

你觉得它是如何运作的？

这是一个很棒的 Discourse 站点，但我没看出它是个博客，因为我原本期待看到的是最新的博文，而不是一堆标题列表。不过，我并不是博客的常客，也许我只是跟不上现在人们对博客的期待了。

我之所以查看，是因为你提到了“主题列表预览”这个神奇的词组，这通常会让我看到伴随文字的精美或引人注目的图片。我认为一些优秀的图形或照片会增加吸引力。

---

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [2020年一月10日 15:50 UTC](https://meta.discourse.org/t/discourse-as-a-simple-personal-blog-engine/138244/3 "2020-01-10T15:50:14Z")

</div>

我觉得这里或许可以开发一个插件，在 [mydomain.com/blog](http://mydomain.com/blog) 页面显示最新博客文章的全文。它甚至可以作为“主题列表预览”（Topic List Previews）的扩展。TLP 支持摘要显示，目前我仅采用了这一功能，因此缺少精美的图片和缩略图。

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年一月10日 15:57 UTC](https://meta.discourse.org/t/discourse-as-a-simple-personal-blog-engine/138244/4 "2020-01-10T15:57:01Z")

</div>

> [@pacharanero](#):
>
> TLP 支持摘录，这正是我目前所做的

这里有一个隐藏的站点设置可以实现这一点：

```plaintext
rails c
SiteSetting.always_include_topic_excerpts = true

```

我认为它只是将数据添加到 JS 模型中，因此你仍然需要进行客户端修改才能真正显示它。

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [2020年一月10日 17:06 UTC](https://meta.discourse.org/t/discourse-as-a-simple-personal-blog-engine/138244/5 "2020-01-10T17:06:57Z")

</div>

你看过这个 [博客文章样式](https://meta.discourse.org/t/blog-post-styling/110841) 主题组件吗，@pacharanero？这可能会是一个有趣的补充。

我确实同意目前它看起来还不太像博客，但我非常喜欢你正在推进的方向！

你也可以将 Discourse 用作一种“无头”内容管理系统（CMS）。我考虑过这个想法，但还没有深入研究。

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2020年一月10日 18:49 UTC](https://meta.discourse.org/t/discourse-as-a-simple-personal-blog-engine/138244/6 "2020-01-10T18:49:22Z")

</div>

别忘了 [News Plugin 📰](https://meta.discourse.org/t/news-plugin/107971?u=merefield%EF%BC%8C%E5%AE%83%E6%9C%AC%E8%BA%AB%E6%98%AF%E5%9C%A8) [Topic List Previews (legacy)](https://meta.discourse.org/t/topic-list-previews/101646) 基础上进行的重制（且需要安装后者）。

---

<div class="post-metadata">

### Author: ![maiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maiki/32/233950_2.png) [@maiki](https://meta.discourse.org/u/maiki)
#### Post date: [2020年一月11日 00:00 UTC](https://meta.discourse.org/t/discourse-as-a-simple-personal-blog-engine/138244/7 "2020-01-11T00:00:43Z")

</div>

好主意！

我是 Hugo SSG 论坛的版主，经常思考静态网站和 Discourse 的结合。🙂 我使用了一个像你们在 Pavilion（faerie ring ventures）那样的实例，还维护了一个个人实例用于笔记、任务和 **收件箱** ，另一个则用于和朋友们互动、评论各种内容。

我 commonbook 网站上几乎所有的页面都链接到论坛上的讨论，并通过 Hugo 的数据模板（`getJSON`）将它们整合进来。

我不加载评论，因为我喜欢让对话留在它发生的地方（Discourse）。

好了，上面是一些零散的想法。接下来分享一件我很期待的事：Hugo 的路线图包括从数据源生成页面。目前，模板需要基于文本文件中的内容才能运行。但未来，你将能够直接指向一个数据源（如 RSS 订阅），并生成你需要的输出。

我已经在设计从 Discourse 和 WordPress 等内容生成器生成输出的网站了。当然，任何能输出 JSON 的内容源都可以！

也许有一天，你可以在 Discourse、邮件或 API 的舒适环境中写博客、与受众互动，同时生成一个快速、轻量、体验出色的静态网站，并且关键的用户体验可以轻松应用。

非常酷的东西。🕶
