@fullstackdatasolutions/articles 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstackdatasolutions/articles",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "funding": {
@@ -358,9 +358,10 @@ describe('getArticleMetadata - frontmatter parsing', () => {
358
358
  })
359
359
  expect(article).not.toBeNull()
360
360
  expect(article!.authorSlug).toBe('andrew-blase')
361
- expect(article!.authorAvatar).toBe(
362
- 'https://example.com/articles/authors/andrew-blase/avatar.jpg'
363
- )
361
+ // Relative, not absolute: authorAvatar is only ever rendered as an
362
+ // <img src>, never used for JSON-LD (which resolves its own absolute
363
+ // URL separately via getAuthorAvatar(author, config) at render time).
364
+ expect(article!.authorAvatar).toBe('/articles/authors/andrew-blase/avatar.jpg')
364
365
  })
365
366
 
366
367
  it('leaves authorSlug and authorAvatar unset when no config is passed', async () => {
@@ -296,9 +296,7 @@ async function getArticleSummary(slug: string, config?: ArticlesConfig): Promise
296
296
  author,
297
297
  authors,
298
298
  authorSlug: primaryAuthorProfile?.slug,
299
- authorAvatar: primaryAuthorProfile
300
- ? getAuthorAvatar(primaryAuthorProfile, config)
301
- : undefined,
299
+ authorAvatar: primaryAuthorProfile ? getAuthorAvatar(primaryAuthorProfile) : undefined,
302
300
  category: categories[0],
303
301
  categories,
304
302
  readTime,