tradingstrategy-ai / frontend

Web frontend for TradingStrategy.ai
https://tradingstrategy.ai
126 stars 23 forks source link

Fix blog indexing to Google #145

Closed miohtama closed 2 years ago

miohtama commented 2 years ago

Currently Google reads this feed: https://tradingstrategy.ai/blog/rss.xml

However it does not seem to pick up URLs from it.

You can test it out by trying to Google this page:

"How to build a large disk server for hosting GoEthereum full node" -> no results

https://tradingstrategy.ai/blog/preparing-a-server-for-hosting-goethereum-full-node

I suspect the reason is that the RSS feed is 16 items, but our blog contains more.

hieuh25 commented 2 years ago

Good guess there, the RSS feed is generated from Ghost client with default pagination size 15: https://github.com/tradingstrategy-ai/frontend/blob/master/src/routes/blog/rss.xml.ts#L7

So we can either loop through the pages or set the limit to all like:

const posts = await ghostClient.posts.browse({limit: 'all'});

Note: set higher limit works for now since we have only a few posts, once we have a few hundreds, looping would be better