Skip to content

Commit

Permalink
[Blog Migration] Article feed update to work with metadata (#1261)
Browse files Browse the repository at this point in the history
Article feed update to work with langroot

Co-authored-by: Ryan Clayton <rclayton@adobe.com>
  • Loading branch information
rgclayton and Ryan Clayton authored Sep 14, 2023
1 parent 986b52f commit 2d4a1ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/blocks/article-feed/article-feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {

import { createTag, getConfig, createIntersectionObserver } from '../../utils/utils.js';
import { replaceKey } from '../../features/placeholders.js';
import { updateLinkWithLangRoot } from '../../utils/helpers.js';

const ROOT_MARGIN = 50;

Expand Down Expand Up @@ -74,9 +75,10 @@ export async function fetchBlogArticleIndex() {
const pageSize = 500;
const { feed } = blogIndex.config;
const queryParams = `?limit=${pageSize}&offset=${blogIndex.offset}`;
const defaultPath = updateLinkWithLangRoot(`${getConfig().locale.contentRoot}/query-index.json`);
const indexPath = feed
? `${feed}${queryParams}`
: `${getConfig().locale.contentRoot}/query-index.json${queryParams}`;
: `${defaultPath}${queryParams}`;

if (blogIndex.complete) return (blogIndex);

Expand Down

0 comments on commit 2d4a1ee

Please sign in to comment.