Skip to content

Commit

Permalink
Setup utils/content-elements
Browse files Browse the repository at this point in the history
- moved buildContentElements to package
- changed resizer to package
- mocked out call to resizer, updated snapshots
  • Loading branch information
tbrick855 committed May 20, 2020
1 parent 7265ba4 commit 7f76ae2
Show file tree
Hide file tree
Showing 19 changed files with 194 additions and 92 deletions.
6 changes: 4 additions & 2 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"@wpmedia/feeds-content-elements": "0.0.0",
"@wpmedia/feeds-prop-types": "0.1.0",
"@wpmedia/feeds-resizer": "0.1.1",
"@wpmedia/feeds-xml-output": "0.1.0"
"@wpmedia/feeds-xml-output": "0.1.0",
"@wpmedia/sitemap-feature-block": "0.3.1",
"@wpmedia/sitemap-news-feature-block": "0.2.1"
},
"changesets": []
"changesets": ["rich-dolphins-provide"]
}
6 changes: 6 additions & 0 deletions .changeset/rich-dolphins-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@wpmedia/rss-feature-block': minor
'@wpmedia/feeds-content-elements': minor
---

built feeds-content-elements package
11 changes: 11 additions & 0 deletions blocks/rss-feature-block/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @wpmedia/sitemaps-feature-block

## 0.1.0-tk.0

### Minor Changes

- built feeds-content-elements package

### Patch Changes

- Updated dependencies []:
- @wpmedia/feeds-content-elements@0.1.0-tk.0

## 0.1.0

### Minor Changes
Expand Down
5 changes: 2 additions & 3 deletions blocks/rss-feature-block/features/rss/xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { resizerKey } from 'fusion:environment'
import { buildContent } from '@wpmedia/feeds-content-elements'
import { buildResizerURL } from '@wpmedia/feeds-resizer'
const jmespath = require('jmespath')
const { fragment } = require('xmlbuilder2')

const rssTemplate = (
elements,
Expand Down Expand Up @@ -72,7 +71,7 @@ const rssTemplate = (
}),
...(channelLogo && {
image: {
url: buildURL(channelLogo, resizerKey, resizerURL),
url: buildResizerURL(channelLogo, resizerKey, resizerURL),
title: `${channelTitle || feedTitle}`,
link: `${domain}`,
},
Expand Down Expand Up @@ -116,7 +115,7 @@ const rssTemplate = (
img.url && {
'media:content': {
'@type': 'image/jpeg',
'@url': buildURL(img.url, resizerKey, resizerURL),
'@url': buildResizerURL(img.url, resizerKey, resizerURL),
...(jmespath.search(img, imageCaption) && {
'media:description': {
'@type': 'plain',
Expand Down
8 changes: 4 additions & 4 deletions blocks/rss-feature-block/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions blocks/rss-feature-block/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wpmedia/rss-feature-block",
"version": "0.1.0",
"version": "0.1.0-tk.0",
"description": "Fusion components for building rss",
"main": "index.js",
"files": [
Expand All @@ -23,7 +23,7 @@
],
"homepage": "https://github.com/WPMedia/feed-components#readme",
"dependencies": {
"@wpmedia/feeds-content-elements": "^0.0.0",
"@wpmedia/feeds-content-elements": "^0.1.0-tk.0",
"@wpmedia/feeds-resizer": "^0.1.1",
"moment": "^2.24.0",
"thumbor-lite": "^0.1.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Object {
Object {
"changefreq": "always",
"image:image": Object {
"image:loc": null,
"image:loc": "hi/abcdefghijklmnopqrstuvwxyz=/arc-anglerfish-arc2-prod-demo.s3.amazonaws.com/public/JTWX7EUOLJE4FCHYGN2COQAERY.png",
"image:title": Object {
"$": "Hand Washing",
},
Expand Down
2 changes: 1 addition & 1 deletion blocks/sitemap-feature-block/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Object {
Object {
"changefreq": "always",
"image:image": Object {
"image:loc": null,
"image:loc": "hi/abcdefghijklmnopqrstuvwxyz=/arc-anglerfish-arc2-prod-demo.s3.amazonaws.com/public/JTWX7EUOLJE4FCHYGN2COQAERY.png",
"image:title": Object {
"$": "Hand Washing",
},
Expand Down
2 changes: 1 addition & 1 deletion blocks/sitemap-news-feature-block/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Object {
"video:category": "Video",
"video:content_loc": "https://d1tf6ure8fkb0l.cloudfront.net/wp-demo/2020/04/16/5e98b4a44cedfd00019ccd14/t_45faafc2013a4185b449ceb539e3df71_name_Inexact_Odyssey__A_Volcom_Snowboarding_Film/file_1920x1080-5400-v4.mp4",
"video:duration": 789,
"video:thumbnail_loc": null,
"video:thumbnail_loc": "hi/abcdefghijklmnopqrstuvwxyz=/dv8csq7v0ltdn.cloudfront.net/04-16-2020/t_95d8de29ea3b41caac132f0462c5c71a_name_file_1920x1080_5400_v4_.jpg",
"video:title": Object {
"$": "Inexact Odyssey, A Volcom Snowboarding Film",
},
Expand Down
2 changes: 1 addition & 1 deletion blocks/sitemap-video-feature-block/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7f76ae2

Please sign in to comment.