Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: content types sync in dev #11716

Merged
merged 2 commits into from
Aug 15, 2024
Merged

fix: content types sync in dev #11716

merged 2 commits into from
Aug 15, 2024

Conversation

florian-lefebvre
Copy link
Member

Changes

  • Content is synced after writeFiles. That means references are not created. To work around it, we create a stub so the reference is created and content sync will override the empty file

Testing

Should pass

Docs

N/A

Copy link

changeset-bot bot commented Aug 15, 2024

🦋 Changeset detected

Latest commit: d93fbc9

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Aug 15, 2024
@@ -124,6 +124,14 @@ export async function syncInternal({
});
await contentLayer.sync();
settings.timer.end('Sync content layer');
} else if (fs.existsSync(getContentPaths(settings.config, fs).contentDir.href)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work on Windows? Using href might be unsafe.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was required to make some tests pass (see first commit). I manually tested it and it seems to work

Copy link
Member

@Princesseuh Princesseuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit worried by the href, but if it works and tests pass, who I am to be worried.

@Princesseuh Princesseuh merged commit f4057c1 into main Aug 15, 2024
13 checks passed
@Princesseuh Princesseuh deleted the fix/sync-content branch August 15, 2024 09:08
@astrobot-houston astrobot-houston mentioned this pull request Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants