# 新闻插件 📰

**URL:** https://meta.discourse.org/t/news-plugin/107971
**Category:** Plugin
**Tags:** pavilion, broken
**Created:** [2019年一月30日 22:26 UTC](https://meta.discourse.org/t/news-plugin/107971 "2019-01-30T22:26:05Z")
**Posts on this page:** 20
**Page:** 6

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2021年十二月6日 11:12 UTC](https://meta.discourse.org/t/news-plugin/107971/106 "2021-12-06T11:12:38Z")

</div>

> [@flash](#):
>
> 也使用了主题预览插件

看起来插件之间存在冲突。@merefield 和我将讨论并回复您 🙂

---

<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: [2021年十二月6日 11:16 UTC](https://meta.discourse.org/t/news-plugin/107971/107 "2021-12-06T11:16:05Z")

</div>

这两个“插件”的功能非常相似，因此并非设计为协同工作。TLP 绝对没有针对已安装 News Plugin 的情况进行开发和测试。

让它们协同工作并非完全不合理，但这对我来说将是优先级非常低的任务。

---

<div class="post-metadata">

### Author: ![flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flash](https://meta.discourse.org/u/flash)
#### Post date: [2021年十二月6日 11:19 UTC](https://meta.discourse.org/t/news-plugin/107971/108 "2021-12-06T11:19:07Z")

</div>

我稍后会再来查看。感谢你们所做的一切@angus @merefield

---

<div class="post-metadata">

### Author: ![tachibanalolo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tachibanalolo/32/233762_2.png) [@tachibanalolo](https://meta.discourse.org/u/tachibanalolo)
#### Post date: [2021年十二月23日 16:04 UTC](https://meta.discourse.org/t/news-plugin/107971/109 "2021-12-23T16:04:39Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/b/7/b7f0ccd5ec6cafcb3b9168906aed9be065e6503c.png)

显示长链接时似乎存在一个错误。它会过大。

---

<div class="post-metadata">

### Author: ![varun21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/varun21/32/246440_2.png) [@varun21](https://meta.discourse.org/u/varun21)
#### Post date: [2022年一月18日 10:34 UTC](https://meta.discourse.org/t/news-plugin/107971/110 "2022-01-18T10:34:22Z")

</div>

**小 Bug：** ……而且不能算是一个 Bug；可能是一个 UX 边缘情况。如果标题是深色，标题中的新闻项目就看不见了。顺便说一下，在我的设置中，它与标题背景的颜色相同。在浏览了论坛后，我突然在我的网站上按下了 CTRL + A，它就显示出来了 😂

不确定如何突出显示它，但也许可以应用一个带颜色背景的默认设置（管理员可以禁用）？谢谢。

---

<div class="post-metadata">

### Author: ![f1r4s](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/f1r4s/32/245347_2.png) [@f1r4s](https://meta.discourse.org/u/f1r4s)
#### Post date: [2022年二月12日 15:12 UTC](https://meta.discourse.org/t/news-plugin/107971/111 "2022-02-12T15:12:39Z")

</div>

如何像你们一样在我的网站上添加 `/news`？

我的 Discourse 设置在 [site.com](http://site.com) 上，我想做和你们一样的事情，可以请您解释一下吗？

谢谢。

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2022年二月12日 21:09 UTC](https://meta.discourse.org/t/news-plugin/107971/112 "2022-02-12T21:09:15Z")

</div>

您是否安装了第一个帖子中描述的插件？您是否启用了它？

---

<div class="post-metadata">

### Author: ![Zup](https://avatars.discourse-cdn.com/v4/letter/z/c37758/32.png) [@Zup](https://meta.discourse.org/u/Zup)
#### Post date: [2022年二月15日 23:14 UTC](https://meta.discourse.org/t/news-plugin/107971/113 "2022-02-15T23:14:20Z")

</div>

> [@Pravi](#):
>
> 关于多订阅源的未来更新？

附议此请求。这将极大地改变此插件的游戏规则。

---

<div class="post-metadata">

### Author: ![BCHK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bchk/32/3268_2.png) [@BCHK](https://meta.discourse.org/u/BCHK)
#### Post date: [2022年五月6日 20:01 UTC](https://meta.discourse.org/t/news-plugin/107971/114 "2022-05-06T20:01:48Z")

</div>

Jay（或其他新闻插件用户），您是否对为什么这个/News插件可能会阻止Google正确创建网站的元标签有任何见解？

我的网站描述信息被Google完全忽略了——因此我在Google结果页面上没有描述。

是否还有其他用户在使用NEWS插件并遇到此问题？

以下是我的问题详情：

> [@How to optimize Google Site Description / Results for News Plugin/ Discourse Site](https://meta.discourse.org/t/how-to-optimize-google-site-description-results-for-news-plugin-discourse-site/226155):
>
> I’m not a CSS expert/coder - Is there any easy way for me to have a better caption for Google Search results - for example the site description (or similar) from the “About Page”, for my discourse forum/News Plugin. Here (below) is what it looks like right now - when I search on google for “rapamycin news” and I would like a better top level textual description for the website before the list of posts: [f3de2014f4d268e0a5aecf5c407514fcddc79fef\_2\_640x213]

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2022年五月9日 08:44 UTC](https://meta.discourse.org/t/news-plugin/107971/115 "2022-05-09T08:44:00Z")

</div>

> [@BCHK](#):
>
> Jay（或任何其他新闻插件用户），您对为什么这个/新闻插件可能会阻止Google正确创建网站元标签有何见解？
> 
> 我的网站描述信息被Google完全忽略了——因此我在Google结果页面中没有描述。

这与新闻插件无关。请参阅

> [@How to optimize Google Site Description / Results for News Plugin/ Discourse Site](https://meta.discourse.org/t/how-to-optimize-google-site-description-results-for-news-plugin-discourse-site/226155/21?u=angus):
>
> Hey @BCHKslight_smile No. The news plugin will not affect the content your website serves to Google’s crawlers. As others have pointed out in different ways, it’s not really up to Discourse. Discourse provides a meta description tag, and yours is appearing in the head of https://www.rapamycin.news as expected. It’s up to Google to decide what to do with that. \<meta name="description" content="Rapamycin and Anti-Aging Medicine Users&#39; Group Discussion Forum"\> Exactly - I think this …

---

<div class="post-metadata">

### Author: ![ms\_krishna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ms_krishna/32/259840_2.png) [@ms\_krishna](https://meta.discourse.org/u/ms_krishna)
#### Post date: [2022年五月11日 05:11 UTC](https://meta.discourse.org/t/news-plugin/107971/116 "2022-05-11T05:11:51Z")

</div>

在暗黑模式下，新闻源显示不正确。

[https://meta.askrpa.com/news](https://meta.askrpa.com/news)

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/e/8/fe8e6d95a10d8c95066e41eda75010d43a3416be.png)

有什么建议吗？谢谢。

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2022年五月14日 21:42 UTC](https://meta.discourse.org/t/news-plugin/107971/117 "2022-05-14T21:42:10Z")

</div>

是的，这是一个长期存在的问题，因为该插件从未与用户选择的浅色/深色模式兼容。

---

<div class="post-metadata">

### Author: ![MattiaB](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattiab/32/262975_2.png) [@MattiaB](https://meta.discourse.org/u/MattiaB)
#### Post date: [2022年六月16日 17:10 UTC](https://meta.discourse.org/t/news-plugin/107971/118 "2022-06-16T17:10:23Z")

</div>

我也对深色模式感兴趣。是否可以将其作为一项功能请求？谢谢 Angus。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2022年六月21日 12:11 UTC](https://meta.discourse.org/t/news-plugin/107971/121 "2022-06-21T12:11:20Z")

</div>

此插件现已支持暗黑模式，感谢 @MattiaB 🎉

> <https://github.com/paviliondev/discourse-news/pull/4>
>
> Enables dark mode support.
> https://meta.discourse.org/t/updating-themes-and-plu…gins-to-support-automatic-dark-mode/161595

---

<div class="post-metadata">

### Author: ![MattiaB](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattiab/32/262975_2.png) [@MattiaB](https://meta.discourse.org/u/MattiaB)
#### Post date: [2022年七月10日 17:45 UTC](https://meta.discourse.org/t/news-plugin/107971/122 "2022-07-10T17:45:52Z")

</div>

插件在移动设备上似乎已损坏：宽度不响应，并且大于手机的最大宽度。此外，共享按钮不起作用。单击它什么也没发生。  
我很想尝试修复这些问题，但我花了几个小时却徒劳无功。该插件在移动设备上使用 max-width，设置为 100%，但由于某种原因，它仍然是固定的，并且比应有的尺寸更大。

---

<div class="post-metadata">

### Author: ![Andy\_Clifton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andy_clifton/32/244459_2.png) [@Andy\_Clifton](https://meta.discourse.org/u/Andy_Clifton)
#### Post date: [2022年八月27日 08:19 UTC](https://meta.discourse.org/t/news-plugin/107971/123 "2022-08-27T08:19:55Z")

</div>

很棒的插件，对我来说运行良好。

我唯一的问题是 `/news.xml` 文件。Core Discourse 会生成一个 `/news.xml` 文件作为站点地图的一部分。我已经确认 [meta.discourse.org](http://meta.discourse.org) 上存在此文件。

不幸的是，在我的网站 [https://talk.inductionzone.org/news.xml](https://talk.inductionzone.org/news.xml) 上，它只是一个带有 406 错误状态的文件。它应该是一个包含所有新帖子的列表，但在这里是空的。

这个插件会生成/与 news.xml 文件进行任何交互吗？我是否不小心在其他地方删除了它？我搜索过，但没有看到任何关于启用/禁用 news.xml 的选项，所以我想知道发生了什么。欢迎所有建议。谢谢！

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2022年八月29日 11:30 UTC](https://meta.discourse.org/t/news-plugin/107971/124 "2022-08-29T11:30:51Z")

</div>

`news.xml` 路径是站点地图的一部分。此插件不会以任何方式影响它。请参阅

> [@Discourse Sitemap](https://meta.discourse.org/t/discourse-sitemap/40348):
>
> discourse2Summary Discourse Sitemap adds a sitemap.xml to your Discourse instanceopen_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately. Features There has been [some](https://meta.discourse.org/t/how-to-create-xml-sitemap-is-there-any-plugin/33654) [discussion](https://meta.discourse.org/t/sitemap-xml-for-google-webmaster/9054/9) over the need of a sitemap, and I think Discourse doesn’t really need one, although I do believe that a forum might be indexed a bit faster with one. Anyway, we created this plugin because of a customer that needed a sitemap for Google N…

确保站点地图已启用。

---

<div class="post-metadata">

### Author: ![Andy\_Clifton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andy_clifton/32/244459_2.png) [@Andy\_Clifton](https://meta.discourse.org/u/Andy_Clifton)
#### Post date: [2022年八月29日 12:50 UTC](https://meta.discourse.org/t/news-plugin/107971/125 "2022-08-29T12:50:24Z")

</div>

谢谢 Angus，告诉我这个不会影响 `news.xml`，并且它仍然由站点地图处理。我检查了一下，站点地图始终启用，并且自 2.9.0.beta4 起就包含在 Discourse 核心中。我使用的是 2.9.0.beta9，所以这已经涵盖了。我已确认站点地图已正确生成。

问题很简单（事后看来）。在[旧站点地图插件的 Github 页面](https://github.com/discourse/discourse-sitemap)上，我发现了以下信息：

> - `/news.xml` : Google 新闻的特殊站点地图，包含过去三天内的所有新主题

所以，如果你没有最近的新主题，`news.xml` 里就没有内容 ☹

---

<div class="post-metadata">

### Author: ![BCHK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bchk/32/3268_2.png) [@BCHK](https://meta.discourse.org/u/BCHK)
#### Post date: [2022年九月6日 18:54 UTC](https://meta.discourse.org/t/news-plugin/107971/126 "2022-09-06T18:54:24Z")

</div>

我使用 News 插件已有 9 个月了，总体来说运行良好。

我有一个问题，为什么不在新闻界面的主页上实现无限滚动。目前它似乎被限制在大约 30 篇文章，然后就停止了。因此，所有旧的新闻报道对人们来说实际上是看不见的。

我更希望在新闻插件的主页上看到无限滚动，这样人们就可以一直滚动查看所有旧的新闻项目。

这是某个地方一个易于修改的变量吗（我不是软件工程师——我是一个商人）。

无限滚动在 discourse 的其他地方无处不在——所以从用户的角度来看，它不在主页上是很奇怪的（尽管我知道插件处理主页，而 discourse 应用程序处理主论坛）。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2022年九月7日 07:35 UTC](https://meta.discourse.org/t/news-plugin/107971/127 "2022-09-07T07:35:18Z")

</div>

是的，它应该有无限滚动。我认为它曾经有过。我还没有时间来确保它在最新版本的 Discourse 上正常工作。

> [@BCHK](#):
>
> 这是一个可以轻松修改的变量吗（我不是软件工程师——我是一名商务人士）。

一般来说，答案是几乎从来都不是一个可以轻松修改的变量 😉

[上一頁](https://meta.discourse.org/t/news-plugin/107971.md?page=5)

[下一頁](https://meta.discourse.org/t/news-plugin/107971.md?page=7)
