Open-source content management system (CMS) built with Phoenix LiveView. Faster render times to boost SEO performance, even for the most content-heavy pages.
A request to that route should call Beacon.Lifecycle.generate_robots_txt/1 which will provide a default implementation that should work for most scenarios:
generate_robots_txt/1 should receive site as argument and call Elixir.Beacon.Config.fetch!(site).endpoint.url() to fetch current site url to be used as prefix for sitemap.xml location.
Generate robots.txt for sites.
Each site will have its own robots.txt which must be resolved dynamically by adding a route
/robots.txt
to https://github.com/BeaconCMS/beacon/blob/7790eb72769a026c0bdfc3167aab394a9b73ce91/lib/beacon/router.ex#L79A request to that route should call
Beacon.Lifecycle.generate_robots_txt/1
which will provide a default implementation that should work for most scenarios:generate_robots_txt/1
should receivesite
as argument and callElixir.Beacon.Config.fetch!(site).endpoint.url()
to fetch current site url to be used as prefix for sitemap.xml location.Then that content should be served as txt.
Depends on #169
Refs