RSSNext / Follow

🧡 Follow your favorites in one inbox
https://follow.is
GNU General Public License v3.0
16.35k stars 690 forks source link

SEO optimization #574

Closed Innei closed 3 weeks ago

Innei commented 1 month ago

Motivation

To improve search engine weighting and share links with more comprehensive OG information.

For example the following external links are used for sharing.

/profile/:handle
/list/:id
/feed/:id

These external sharing links need to be optimized for SEO.

Technical Solution:

Use a partial SSR scheme. Build a web server on top of the current one. in a production environment, proxy the product of the web build.

This can simply be thought of as a server that hosts HTTP resources.

Then match the above paths and replace and inject the Meta tags in the response HTML.

<html>...
<! -- INJECT_META_TAGS -->

Replace it this way, then request the API interface at the HTTP Server, get the data, and parse it as <meta />.


动机

为了提升搜索引擎权重和分享链接的 OG 信息更加全面。

例如下面的外部链接是被用于分享的。

/profile/:handle
/list/:id
/feed/:id

这些外部分享链接需要优化 SEO 。

技术方案:

使用部分 SSR 方案。在当前的基础上建立 web server。在生产环境,代理 web 构建的产物。

这里可以简单理解为一个托管 HTTP 资源的服务器。

然后针对上面的这些路径进行匹配,然后在响应的 HTML 中,替换并注入 Meta tag。

<html>...
<!-- INJECT_META_TAGS -->

通过这种方式去替换,然后在 HTTP Server 请求 api 接口,获取数据,然后解析为 <meta />

linear[bot] commented 1 month ago

FOL-239 SEO optimization