SlideShare une entreprise Scribd logo
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

Contenu connexe

Similaire à Lessons Learned Migrating from Jekyll to Next.pptx

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Dernier (20)

Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 

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