SlideShare a Scribd company logo
1 of 29
Lessons Learned
Migrating from
Jekyll to Next
With Help from Playwright
And Corgis
• I love these projects
• Corgibytes does a lot of these
Platform Migrations
• No user visible changes
• Gradual approach
• Guided by tests
Philosophy
• Launched 10 years ago
• Built with Jekyll
• Hosted using an AWS S3 bucket
• Opportunity to practice and experiment
corgibytes.com
• Goals
• Component-based
• Remain static
• Minimal changes to blog posts
Time For a Change
• Considered a lot of options
• Astro
• Eleventy
• Gatsby
• Hugo
• Next
• Remix
Picking the Right Tool
• React
• high team comfort level
• Great static site support
• New ”app” router fit the problem
• Server components
• File-based routing
• Found blog starter project
• https://next-blog-starter.vercel.app/
Choosing Next
• Playwright
• Screenshot comparisons
• Focus on critical pages
• No need to hit every blog post
• One is enough
• Multiple viewport sizes
• Multiple web browsers
• 2% difference permitted
• Validates page metadata
• Validates RSS feed contents
• Use production for initial capture
Testing Approach
Pages to Test
Capture Screenshots
• Pros
• High fidelity & confidence
• Aids progress tracking
• Cons
• Lots of images
• No seriously, lots of images
• ~650 MB
• Git LFS is a must
• Time intensive
• Multiple cores helps a ton
The Good & The Bad
• Go one page at a time
• Run just the tests for that page
• Create the Next page component
• Ex: ./app/about/page.tsx
• Copy Jekyll/Liquid content into component
body
• Clean up errors
• Ex: Convert class to className
• Create “api” functions for accessing any Jekyll
collections content
• Migrate static content out of the markup
• Create components to reduce duplication
Implementation
Jekyll Collection: Team
Before: Jekyll + Liquid
After: Next + React
Querying Page Content
Retrieving All Team Members
Loading a Single Team Member
Converts Markdown to HTML
Loading File Contents
Loading a Blog Post
Loading a Generic Collection
Converts Markdown to HTML
• Pros
• Almost no changes required to any
Jekyll collection or blog post
• Lays foundation for migrating to a
headless CMS
• Cons
• Performance
• Caching of file system content
happens once per request
• Dev mode blog post loading is slow
• Builds are slow (more cores helps)
The Good & The Bad
• Using GitHub Actions
• Creates static build
• Starts http-server
• Runs all snapshot tests
• Publish to AWS S3
• Invalidate CloudFront cache
Deployment
• Move content to headless CMS
• Considering Strapi
• Work with a design firm to
refresh look and feel
• Improve dev & build performance
• Remove unused CSS & migrate to
Tailwind
Future Additions
Contact Information
M. Scott Ford
Email:
scott@corgibytes.com
Mastodon:
@mscottford@legacycoderocks.com
LinkedIn:
in/mscottford
Phone:
804.596.2375x701
Like Podcasts?
Listen to Legacy Code Rocks!
Questions?
The End
Image Credits
Sunglasses Corgi
https://stock.adobe.com/images/red-corgi-in-sunglasses-in-the-car-on-summer-vacation-traveling-with-a-dog-sun-is-shining-no-people-generative-ai/613784699?prev_url=detail
Shoes Corgi
https://stock.adobe.com/images/cute-corgi-dog-puppy-in-sports-sneakers-on-jogging-in-the-park/471057888?prev_url=detail
Glasses & Tie Corgi
https://stock.adobe.com/images/a-welsh-corgi-puppy-in-glasses-and-tie-sits-with-a-book-on-a-green-background-the-concept-of-training-office-work/560420692?prev_url=detail
Pillow & Clock Corgi
https://stock.adobe.com/images/cute-dog-with-alarm-clock-and-pillow-at-home/417761843?prev_url=detail
Construction Corgi
https://stock.adobe.com/images/cute-working-dog-corgi-in-a-construction-helmet-and-with-a-set-of-tools-sits-on-a-background-of-bricks-and-smiles/634456851?prev_url=detail
Puppy Group
https://stock.adobe.com/images/group-of-corgi-puppy-dogs-lying-relaxing-and-sleeping-in-summer-sunny-day/251026313?prev_url=detail
Measuring Tape Corgi
https://stock.adobe.com/images/dog-corgi-overweight-and-fatness-with-tapeline/312729682?prev_url=detail
Food Choices Corgi
https://stock.adobe.com/images/dog-food-food-for-animals-beautiful-corgi-eats-food/608206668?prev_url=detail
Ready to Work Corgi
https://stock.adobe.com/images/cute-working-dog-corgi-in-a-construction-helmet-and-with-a-hammer-in-his-teeth-on-a-brick-background/634358393?prev_url=detail
Rocket Ship Corgi
https://stock.adobe.com/images/corgi-flying-in-the-space-through-the-stars-near-the-moon-with-a-view-on-planet-earth/557948887?prev_url=detail
Cyberpunk Corgi
https://stock.adobe.com/images/corgi-flying-in-the-space-through-the-stars-near-the-moon-with-a-view-on-planet-earth/557948887?prev_url=detail
Walking Away Corgi
https://stock.adobe.com/images/corgi-dog-pembroke-welsh-corgi-outdoor-in-summer-park/337469887?prev_url=detail

More Related Content

Similar to Lessons Learned Migrating from Jekyll to Next.pptx

Similar to Lessons Learned Migrating from Jekyll to Next.pptx (20)

React-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsxReact-Js-Online-Training-9028522.ppsx
React-Js-Online-Training-9028522.ppsx
 
Agile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAgile Secure Cloud Application Development Management
Agile Secure Cloud Application Development Management
 
CodeIgniter for Startups, cicon2010
CodeIgniter for Startups, cicon2010CodeIgniter for Startups, cicon2010
CodeIgniter for Startups, cicon2010
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
Docs at Weaveworks: DX from open source to SaaS and beyond
Docs at Weaveworks: DX from open source to SaaS and beyondDocs at Weaveworks: DX from open source to SaaS and beyond
Docs at Weaveworks: DX from open source to SaaS and beyond
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
 
Git Going w/ Git
Git Going w/ GitGit Going w/ Git
Git Going w/ Git
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
Learning React - I
Learning React - ILearning React - I
Learning React - I
 
Fission Introduction
Fission IntroductionFission Introduction
Fission Introduction
 
Fluxible
FluxibleFluxible
Fluxible
 
BackboneJS
BackboneJSBackboneJS
BackboneJS
 
Managing Changes to the Database Across the Project Life Cycle (presented by ...
Managing Changes to the Database Across the Project Life Cycle (presented by ...Managing Changes to the Database Across the Project Life Cycle (presented by ...
Managing Changes to the Database Across the Project Life Cycle (presented by ...
 
Managing changes to eZPublish Database
Managing changes to eZPublish DatabaseManaging changes to eZPublish Database
Managing changes to eZPublish Database
 
How we built a job board in one week with JHipster
How we built a job board in one week with JHipsterHow we built a job board in one week with JHipster
How we built a job board in one week with JHipster
 
How we built a job board in one week with JHipster - @KileNiklawski @IpponUSA
How we built a job board in one week with JHipster - @KileNiklawski @IpponUSAHow we built a job board in one week with JHipster - @KileNiklawski @IpponUSA
How we built a job board in one week with JHipster - @KileNiklawski @IpponUSA
 
How to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScaleHow to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that Scale
 

More from M. Scott Ford

Communication is Just as Important as Code
Communication is Just as Important as CodeCommunication is Just as Important as Code
Communication is Just as Important as Code
M. Scott Ford
 
Building a Bridge to a Legacy Application: How Hard Can That Be?
Building a Bridge to a Legacy Application: How Hard Can That Be?Building a Bridge to a Legacy Application: How Hard Can That Be?
Building a Bridge to a Legacy Application: How Hard Can That Be?
M. Scott Ford
 

More from M. Scott Ford (11)

PyGeekle 2022 - A Deep Dive into Measuring Dependency Freshness with LibYear
PyGeekle 2022 - A Deep Dive into Measuring Dependency Freshness with LibYearPyGeekle 2022 - A Deep Dive into Measuring Dependency Freshness with LibYear
PyGeekle 2022 - A Deep Dive into Measuring Dependency Freshness with LibYear
 
Communication is Just as Important as Code
Communication is Just as Important as CodeCommunication is Just as Important as Code
Communication is Just as Important as Code
 
MenderCon 2021 - Keynote
MenderCon 2021 - KeynoteMenderCon 2021 - Keynote
MenderCon 2021 - Keynote
 
Moving a Monolith to Kubernetes
Moving a Monolith to KubernetesMoving a Monolith to Kubernetes
Moving a Monolith to Kubernetes
 
MenderCon 2020 Keynote Presentation
MenderCon 2020 Keynote PresentationMenderCon 2020 Keynote Presentation
MenderCon 2020 Keynote Presentation
 
Makers and menders - Finding Talent for Legacy Code Projects
Makers and menders - Finding Talent for Legacy Code ProjectsMakers and menders - Finding Talent for Legacy Code Projects
Makers and menders - Finding Talent for Legacy Code Projects
 
A deep dive into measuring dependency freshness with lib year
A deep dive into measuring dependency freshness with lib yearA deep dive into measuring dependency freshness with lib year
A deep dive into measuring dependency freshness with lib year
 
Building a Bridge to a Legacy Application: How Hard Can That Be?
Building a Bridge to a Legacy Application: How Hard Can That Be?Building a Bridge to a Legacy Application: How Hard Can That Be?
Building a Bridge to a Legacy Application: How Hard Can That Be?
 
Important metrics for Measuring Code Health
Important metrics for Measuring Code HealthImportant metrics for Measuring Code Health
Important metrics for Measuring Code Health
 
Embracing the Red Bar: A Technique for Safely Refactoring Your Test Suite
Embracing the Red Bar: A Technique for Safely Refactoring Your Test SuiteEmbracing the Red Bar: A Technique for Safely Refactoring Your Test Suite
Embracing the Red Bar: A Technique for Safely Refactoring Your Test Suite
 
Old Code, New Tricks
Old Code, New TricksOld Code, New Tricks
Old Code, New Tricks
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 

Lessons Learned Migrating from Jekyll to Next.pptx

  • 1. Lessons Learned Migrating from Jekyll to Next With Help from Playwright And Corgis
  • 2. • I love these projects • Corgibytes does a lot of these Platform Migrations
  • 3. • No user visible changes • Gradual approach • Guided by tests Philosophy
  • 4. • Launched 10 years ago • Built with Jekyll • Hosted using an AWS S3 bucket • Opportunity to practice and experiment corgibytes.com
  • 5. • Goals • Component-based • Remain static • Minimal changes to blog posts Time For a Change
  • 6. • Considered a lot of options • Astro • Eleventy • Gatsby • Hugo • Next • Remix Picking the Right Tool
  • 7. • React • high team comfort level • Great static site support • New ”app” router fit the problem • Server components • File-based routing • Found blog starter project • https://next-blog-starter.vercel.app/ Choosing Next
  • 8. • Playwright • Screenshot comparisons • Focus on critical pages • No need to hit every blog post • One is enough • Multiple viewport sizes • Multiple web browsers • 2% difference permitted • Validates page metadata • Validates RSS feed contents • Use production for initial capture Testing Approach
  • 11. • Pros • High fidelity & confidence • Aids progress tracking • Cons • Lots of images • No seriously, lots of images • ~650 MB • Git LFS is a must • Time intensive • Multiple cores helps a ton The Good & The Bad
  • 12. • Go one page at a time • Run just the tests for that page • Create the Next page component • Ex: ./app/about/page.tsx • Copy Jekyll/Liquid content into component body • Clean up errors • Ex: Convert class to className • Create “api” functions for accessing any Jekyll collections content • Migrate static content out of the markup • Create components to reduce duplication Implementation
  • 15. After: Next + React
  • 18. Loading a Single Team Member Converts Markdown to HTML
  • 21. Loading a Generic Collection Converts Markdown to HTML
  • 22. • Pros • Almost no changes required to any Jekyll collection or blog post • Lays foundation for migrating to a headless CMS • Cons • Performance • Caching of file system content happens once per request • Dev mode blog post loading is slow • Builds are slow (more cores helps) The Good & The Bad
  • 23. • Using GitHub Actions • Creates static build • Starts http-server • Runs all snapshot tests • Publish to AWS S3 • Invalidate CloudFront cache Deployment
  • 24. • Move content to headless CMS • Considering Strapi • Work with a design firm to refresh look and feel • Improve dev & build performance • Remove unused CSS & migrate to Tailwind Future Additions
  • 25. Contact Information M. Scott Ford Email: scott@corgibytes.com Mastodon: @mscottford@legacycoderocks.com LinkedIn: in/mscottford Phone: 804.596.2375x701
  • 26.
  • 27. Like Podcasts? Listen to Legacy Code Rocks!
  • 29. Image Credits Sunglasses Corgi https://stock.adobe.com/images/red-corgi-in-sunglasses-in-the-car-on-summer-vacation-traveling-with-a-dog-sun-is-shining-no-people-generative-ai/613784699?prev_url=detail Shoes Corgi https://stock.adobe.com/images/cute-corgi-dog-puppy-in-sports-sneakers-on-jogging-in-the-park/471057888?prev_url=detail Glasses & Tie Corgi https://stock.adobe.com/images/a-welsh-corgi-puppy-in-glasses-and-tie-sits-with-a-book-on-a-green-background-the-concept-of-training-office-work/560420692?prev_url=detail Pillow & Clock Corgi https://stock.adobe.com/images/cute-dog-with-alarm-clock-and-pillow-at-home/417761843?prev_url=detail Construction Corgi https://stock.adobe.com/images/cute-working-dog-corgi-in-a-construction-helmet-and-with-a-set-of-tools-sits-on-a-background-of-bricks-and-smiles/634456851?prev_url=detail Puppy Group https://stock.adobe.com/images/group-of-corgi-puppy-dogs-lying-relaxing-and-sleeping-in-summer-sunny-day/251026313?prev_url=detail Measuring Tape Corgi https://stock.adobe.com/images/dog-corgi-overweight-and-fatness-with-tapeline/312729682?prev_url=detail Food Choices Corgi https://stock.adobe.com/images/dog-food-food-for-animals-beautiful-corgi-eats-food/608206668?prev_url=detail Ready to Work Corgi https://stock.adobe.com/images/cute-working-dog-corgi-in-a-construction-helmet-and-with-a-hammer-in-his-teeth-on-a-brick-background/634358393?prev_url=detail Rocket Ship Corgi https://stock.adobe.com/images/corgi-flying-in-the-space-through-the-stars-near-the-moon-with-a-view-on-planet-earth/557948887?prev_url=detail Cyberpunk Corgi https://stock.adobe.com/images/corgi-flying-in-the-space-through-the-stars-near-the-moon-with-a-view-on-planet-earth/557948887?prev_url=detail Walking Away Corgi https://stock.adobe.com/images/corgi-dog-pembroke-welsh-corgi-outdoor-in-summer-park/337469887?prev_url=detail