You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Algolia for site search. It's really good. I would like to use a few faceted searches to produce static WTFJHT topic pages when the site builds (i.e. russia, health care, travel ban, etc).
This seems like an appropriate task for a Jekyll Generator plugin. When the site builds, make a call to the Algolia API for each topic I want to create, and build a single page per topic with all the responses in reverse-chron order using a specific template file.
The Algolia API returns a raw response and is indexed on p tags. So, theoretically (?), we could assemble all that HTML on the page and we'd be good to go. A nice to have bit would be to remove the leading 1/, 8/, 15/ slug.
Why static? I want them to have a simple permalink, be indexable in Google and shareable on social without the need of a query string.
I don't really know Ruby and am unclear if you can even make an API call from within a generator, return the data, and then build the page. There is probably a much better way of doing this... Suggestions?
The text was updated successfully, but these errors were encountered:
I use Algolia for site search. It's really good. I would like to use a few faceted searches to produce static WTFJHT topic pages when the site builds (i.e.
russia
,health care
,travel ban
, etc).This seems like an appropriate task for a Jekyll Generator plugin. When the site builds, make a call to the Algolia API for each topic I want to create, and build a single page per topic with all the responses in reverse-chron order using a specific template file.
The Algolia API returns a raw response and is indexed on p tags. So, theoretically (?), we could assemble all that HTML on the page and we'd be good to go. A nice to have bit would be to remove the leading
1/
,8/
,15/
slug.Why static? I want them to have a simple permalink, be indexable in Google and shareable on social without the need of a query string.
I don't really know Ruby and am unclear if you can even make an API call from within a generator, return the data, and then build the page. There is probably a much better way of doing this... Suggestions?
The text was updated successfully, but these errors were encountered: