Ideas for Arc XP

Pull feedDomainURL from Environment Instead of blocks.json

Developing OBFs from local -> sandbox -> production is cumbersome because of the way Fusion decides what the feedDomainURL is. According to this documentation:https://sandbox.coindesk.arcpublishing.com/alc/arc-products/arcio/user-docs/outbound-feeds-environments/


In each feed, all of the content is given a fully qualified url with your domain (Https://Www.Example.Com). The domain used comes from your blocks.json in the siteProperties field “feedDomainURL” for each website. Since there is only one value per website in blocks.json, you have to decide how you want to handle sandbox urls. If you use the production domain the links will not be valid since it will attempt to request sandbox content from your production system. If you want to use the sandbox domain, you need to develop a process to change the blocks.json between sandbox and prod deploys.

The root issue here is that the feedDomainURL is being defined in blocks.json. Which appears to be merged in o fusion:properties. Here's the code: https://github.com/WPMedia/feed-components/blob/develop/blocks/sitemap-index-by-day-feature-block/features/sitemap-index/xml.js

So, sure, this can be fixed programmatically, but you could also simply move the assignment of feedDomainURL to environment and change the code to:


import { feedDomainURL } from "fusion:environment";


  • Spencer Beggs
  • Aug 10 2021
  • Future consideration
  • Attach files
  • Elinor O'Neill commented
    13 Jan 03:42pm

    Upvoting this. Invalid URLs make end to end testing of feeds in Sandbox impossible without messy workarounds.