Conversation
- Ensure generated file paths are unique by checking for existing files and appending a random suffix if needed - Automatically update the canonical URL on dev.to for published posts that don't already have the correct canonical URL set
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new dev.to blog synchronization system that automatically imports blog posts from dev.to and integrates them into the Astro-based portfolio website. The sync tool fetches articles via the dev.to API and generates markdown files with proper frontmatter for both published and draft content.
Key changes:
- Added Python-based dev.to sync tool for importing blog content
- Extended blog layout to support both legacy and new v1Data blog formats
- Added draft blog collection and routing for unpublished content
Reviewed Changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tools/dev-to-sync/main.py |
Main sync script that fetches articles from dev.to API and generates markdown files |
tools/dev-to-sync/utils.py |
Utility functions for file path generation and slug creation |
src/content.config.ts |
Added draft_blog collection and v1Data schema for synced content |
src/layouts/blog.astro |
Enhanced layout to support both legacy and new blog formats with cover images |
src/components/SocialButtons.astro |
Added dev.to link button for synced articles |
src/pages/draft/blog/[...slug].astro |
New page handler for draft blog posts |
.github/workflows/ci.yml |
Integrated dev.to sync into CI pipeline |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.