# Updating blocks.json and Outbound Feeds Development

Source: https://dev.arcxp.com/arc-io/developer-docs/updating-blocksjson-and-outbound-feeds-development/

This is the main configuration file used to control which blocks are imported and to set global variables. Your repository’s `blocks.json` file contains all the available blocks in the blocks array. Normally the only things you need to change in `blocks.json` are the `siteProperties`. As new blocks become available, you must update the blocks array with the new blocks and create and deploy a new bundle.

## Sample Configuration File

```json
    {
  "org": "@wpmedia/",
  "blocks": [
    "@wpmedia/feeds-source-content-api-block",
    "@wpmedia/feeds-source-content-api-by-day-block",
    "@wpmedia/feeds-source-content-api-by-day2-block",
    "@wpmedia/feeds-source-content-api-by-day3-block",
    "@wpmedia/feeds-source-single-content-block",
    "@wpmedia/feeds-source-collections-block",
    "@wpmedia/site-hierarchy-content-block",
    "@wpmedia/ans-feature-block",
    "@wpmedia/mrss-feature-block",
    "@wpmedia/rss-alexa-feature-block",
    "@wpmedia/rss-feature-block",
    "@wpmedia/rss-fbia-feature-block",
    "@wpmedia/rss-flipboard-feature-block",
    "@wpmedia/rss-google-news-feature-block",
    "@wpmedia/rss-msn-feature-block",
    "@wpmedia/sitemap-news-feature-block",
    "@wpmedia/sitemap-video-feature-block",
    "@wpmedia/sitemap-feature-block",
    "@wpmedia/sitemap-index-by-day-feature-block",
    "@wpmedia/sitemap-index-feature-block",
    "@wpmedia/sitemap-section-feature-block",
    "@wpmedia/sitemap-section-index-feature-block",
    "@wpmedia/json-output-block",
    "@wpmedia/text-output-block",
    "@wpmedia/textfile-block"
  ],
  "values": {
    "default": {
      "siteProperties": {
        "feedTitle": "Outbound Feeds",
        "feedDomainURL": "http://localhost",
        "feedLanguage": "en",
        "resizerURL": "http://localhost/resizer",
        "feedDefaultQuery": "[{\"term\":{\"type\":\"story\"}},{\"range\":{\"display_date\":{\"gte\":\"now-2d\",\"lte\":\"now\"}}}]"
      }
    },
    "sites": {
      "website1": {
        "siteProperties": {
          "feedTitle": "website 1",
          "feedDomainURL": "https://www.website1.com",
          "feedLanguage": "en",
          "resizerURL": "https://www.website1.com/resizer"
        }
      },
      "website2": {
        "siteProperties": {
          "feedTitle": "website 2",
          "feedDomainURL": "https://www.website2.com",
          "feedLanguage": "es",
          "resizerURL": "https://www.website2.com/resizer"
        }
      }
    }
  }
}
```

## Blocks Configs

- **org:** The name of the npm repository, it should always be `@wpmedia`.
- **blocks:** An array of npm packages that will be loaded by the `arc-fusion/cli` at run time.
- **values:** global configuration variables. The values set in default will be used by all websites. Any values set in a website specific section will override those default settings.

## Site Configs

Inside the `values` key are the site properties. Replace the default values with your specific site values. They are broken out into two groups: default and sites. The system uses the default values unless that value is also set in a website section. You should have a section for each of your websites. The website key must match the `website _id` used in Site Service. For example, if all but one of your websites use English, in `default` you can set `feedLanguage: "en"`. Then in the one website that uses Spanish, you can set `feedLanguage: "es"`.

No other website would need to have feedLanguage set.

- `feedDomainURL` \- The fully qualified url for the site. It must not end in a slash.
- `resizerURL` \- The fully qualified url for the sites resizer. It must not end in a slash. Typically this is the same as the `feedDomainURL` with `/resizer` at the end.
- `feedTitle` \- The name of your website. This will be used as the title in RSS feeds
- `feedLanguage` \- The ISO-3166 two letter country code.
- `feedDefaultQuery` \- Optional, this overrides the default query used in `feeds-source-content-api-block`, which is stories with `last_updated_date` from the last two days. You can override this value in the resolver by setting `Term-Include` and `Term-Exclude` values, for example, if you want to use `display_date` instead of `last_updated_date`. The `feedDefaultQuery` value must be a valid Json array in the following format:

```
"[{\"term\":{\"type\":\"story\"}},{\"range\":{\"display_date\":{\"gte\":\"now-2d\",\"lte\":\"now\"}}}]
```
