Migrate website from static HTML to Next.js #1
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.
Summary
Migrating a website from static HTML to Next.js improves performance, SEO, and long-term scalability by enabling pre-rendering, dynamic routing, and component-based development. It allows better code reuse, optimized assets, built-in routing, and flexible rendering strategies while maintaining fast load times. Overall, Next.js transforms a simple static site into a maintainable, future-ready web application without sacrificing speed.
So I figured my first step into modifying the website is to complete the migration, then other changes shall follow.
Changes
Removed Old Files and Folders
The following old files and folders have been removed since migrating to Next.js:
Deleted:
Moved to public/:
Kept:
Current Project Structure
.
├── public/ # Static assets
│ ├── fonts/ # Self-hosted fonts
│ ├── images/ # Image assets
│ └── *.ico, *.png # Favicons and icons
├── src/ # Next.js source code
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ ├── design-system/ # Design tokens
│ └── styles/ # Global styles
├── scripts/ # Utility scripts
└── [config files] # Next.js, TypeScript, etc.
Build Status
The project builds successfully:
Verification:
Run the development server:
npm run devOpen your browser to:
http://localhost:3000Screenshot:
The website successfully loads with zero errors and from here on modifications can be made to individual pages, one at a time.