Migrate website to Next.js rebuild (history-preserving)#195
Migrate website to Next.js rebuild (history-preserving)#195rudra-iitm wants to merge 76 commits into
Conversation
feat(authors): add reusable AuthorCard component
…es (#8) feat(authors): add reusable AuthorCard component and fix all linting issues
[feat add]: integrate AuthorCard into news post layout
…#11) feat(news): migrate all posts from old Jekyll site into Next.js contents --------- Co-authored-by: Rudra Pratap Singh <rudransh.iitm@gmail.com>
* feat(posts): add automatic redirect support for previous slugs * fix(posts): decode slug before matching post filenames
…18) Implemented a complete client-side search system with build-time indexing, markdown AST-based content normalization, and MiniSearch integration. Added a responsive search modal with keyboard shortcuts, debounced input, loading states, and improved UI/UX, along with proper typing, production compatibility, and documentation.
…te (#13) Fixed React Server Components CVE vulnerabilities by updating dependencies (next, react-server-dom-webpack, react-server-dom-parcel, and react-server-dom-turbopack) to secure versions using the fix-react2shell-next tool, ensuring all package.json files use patched versions based on the official React advisory. Improved site navigation by replacing scroll-based links with route-based navigation and resolving link/button issues. Implemented and migrated multiple website pages including About Us, Contribute, Contact, Downloads, Documentation, Driverless, and other legacy markdown pages. Added a fully functional projects section, news listing with sidebar and year-based navigation, and homepage improvements such as rendering latest posts and aligning hero/info sections with the live site. Fixed theme behavior to follow the system color scheme, updated author card styling for light mode, aligned the footer globally, corrected homepage interactions, and resolved build issues for Next.js 15 static export. Also cleaned content by removing non-legacy news files, syncing posts, updating dependencies, and adjusting the search index. Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by: Rudra Pratap Singh rudransh.iitm@gmail.com
style: Refine UI styling and update color palette Refined the overall UI styling by updating the color palette and adjusting layouts across multiple components and pages to provide a cleaner and more consistent visual refresh. feat: Redesign search modal with spotlight-style interface Redesigned the search modal to follow a spotlight-style interface for a more modern search experience. Added an escape-to-close feature and improved the presentation of search results. feat: Improve search input responsiveness and TOC styling Improved the responsiveness of the search input for better usability and updated the styling of table of contents headings for improved readability. feat(navbar): Improve mobile search button usability Enhanced the styling and spacing of the mobile search button in the navbar to make it easier to access and visually consistent with the rest of the interface. feat(hero): Add subtle banner image to hero section Added a subtle background banner image to the hero section and adjusted its height to improve visual balance and overall page appeal.
… handling Added an environment variable `NEXT_PUBLIC_BASE_PATH` to the Next.js configuration for dynamic image path handling based on the production environment. Updated image sources in the Downloads page and hero section to utilize this variable, ensuring correct image loading in different environments. Removed the hardcoded background image URL in the hero section for improved flexibility. Also updated the generated timestamp in the static search index.
…onment flexibility; update generated timestamp in static index
…sed on environment; update generated timestamp in static index
…th; remove unused CSS comments for cleaner code
…ity and responsiveness; update generated timestamp in static index
…dex generation timestamp.
…on for the embedding process.
Co-authored-by: rudra-iitm <120119520+rudra-iitm@users.noreply.github.com> Agent-Logs-Url: https://github.com/rudra-iitm/openprinting.github.io/sessions/46c64b8d-0378-4b0d-92d0-12e03577c126
Co-authored-by: rudra-iitm <120119520+rudra-iitm@users.noreply.github.com> Agent-Logs-Url: https://github.com/rudra-iitm/openprinting.github.io/sessions/e3ab0516-c614-4dde-9005-a8c0fc5febef
Add RSS 2.0 feed for blog posts
…ionality Add smart 404 page with trailing slash redirect for GitHub Pages
- Introduced a Separator component for UI layout. - Added SimpleSelect and SimpleSelectItem components for dropdown selection. - Implemented a Skeleton component for loading states. - Created utility functions for base path handling and debouncing. - Defined TypeScript interfaces for printer and driver data structures. - Developed utility functions for class name merging and printer status calculation. - Implemented scripts for combining, generating, and splitting printer data from XML to JSON. - Added PPD generation script and handling for printer capabilities.
- Updated PrinterSearch to use new shared components for better consistency and maintainability. - Replaced SimpleSelect with FoomaticSelect for filtering options. - Removed unused badge, button, card, dropdown-menu, input, select, separator, simple-select, and skeleton components. - Introduced shared components: FoomaticCard, FoomaticHeroPill, FoomaticSelect, and FoomaticBadge for UI consistency. - Adjusted layout and styling for improved user experience in the Printers component. - Updated utility functions to streamline class name management.
…constants into a new site.config.ts file
…tency across multiple components
…ove indexing process
… generation pipeline - Deleted old JavaScript scripts for data generation and processing. - Added TypeScript versions of data generation scripts: `data-generate.ts`, `generate-from-xml.ts`, `combine-data.ts`, and `split-printers.ts`. - Updated the data generation pipeline to use TypeScript and improved error handling. - Enhanced printer data processing with better type definitions and structured output. - Created a new `PageHero` component for improved UI consistency. - Introduced a new `site.ts` utility for handling site URLs and paths. - Updated RSS feed generation to use new site configuration. - Improved TypeScript configuration for better module resolution and type checking.
New post and image assets for Opportunity Open Source 4.0 at IIIT Allahabad, plus regenerated RSS feed and search index. Pin Yarn to the node-modules linker via .yarnrc.yml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Prepare the Next.js rebuild to become the live site at the OpenPrinting organization root Pages site (https://openprinting.github.io/): - site.config.ts: set repo owner to OpenPrinting so repo slug, links and Giscus mapping point at the production repository. - basePath: default to "" (root) instead of /openprinting.github.io. The org *root* Pages site is served from the domain root, so a project-style subpath prefix would 404 every asset, stylesheet, script and link. Use `?? ""` so an explicit NEXT_PUBLIC_BASE_PATH override is still honored. - Giscus: point repoId at OpenPrinting/openprinting.github.io. That repo has no "Blog Comments" discussion category yet, so map comments to the existing "General" category (a maintainer may add a dedicated Announcements-type category later). - Workflows: trigger build/deploy on master (the production default branch) rather than main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the Jekyll site contents with the new Next.js + Tailwind rebuild while preserving BOTH lineages as merge parents: parent 1: master — 7 years of OpenPrinting site history (891 commits) parent 2: redesign — the Next.js rewrite (70 commits) The working tree of this commit is exactly the redesign tree. No history was rewritten and no commits were dropped: every author, timestamp, and commit on both sides remains reachable via `git log`. Deployment note: this repo's GitHub Pages source must be switched from the legacy Jekyll builder to "GitHub Actions" (the deploy.yml workflow) before or at the moment this lands on master, otherwise Pages will try to Jekyll- build a Next.js tree. This requires repo admin and is documented in the PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@tillkamppeter I am assigning this to you to review. @rudra-iitm Is there a live link you can provide that shows the new web site content for others to review? |
The project migrated to Yarn 4 (Berry lockfile + .yarnrc.yml), but CI ran the runner's default Yarn 1 with `--frozen-lockfile`, which cannot satisfy a Yarn 4 lockfile and failed install. - Pin Yarn with "packageManager": "yarn@4.12.0" so Corepack resolves it. - Enable Corepack after setup-node in both workflows. - Use `yarn install --immutable` (Yarn 4's frozen-lockfile equivalent). Verified locally: `yarn install --immutable` succeeds against the committed lockfile. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
setup-node's `cache: yarn` runs `yarn cache dir` using the runner's global Yarn 1, which aborts when package.json pins "packageManager": "yarn@4". Remove the built-in cache and rely on Corepack (enabled in the next step). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Yarn 4 (Berry) does not execute implicit pre/post lifecycle scripts, so `yarn build` no longer triggered `prebuild`. That left the Foomatic data (public/foomatic-db/printersMap.json) ungenerated, so generateStaticParams() returned [] and `output: export` failed on /foomatic/printer/[id]. Move the generation chain into an explicit `generate` script and have `build` run it before `next build`, so it works under any package manager. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Hi, you can view the live preview at: https://rudra-iitm.github.io/openprinting.github.io/ |
|
The site updates look great to me, and the working site search is a welcome addition. |
|
I have found some bugs, in "News and Events":
Another thing I did not test: Are all the links conserved? If external sites link to our site these links should continue to work. Also, could you, so that we get examples for applying to other posts, add the following 2 features to the post about my Tech over Tea video (I have earlier reported issues and you had solved them):
|
|
Another little issue: In all pages (at least in my blog posts) the section titles appear as links pointing to themselves. They should, as you see on the old site not appear as links but have anchors so that they can be navigated to with |
|
Next issue: Click on the search button at the top right and enter "Fax" as search term. For me the very first result is "IPP Fax Out - A new reality". Click this entry and you get a 404. |
|
On "Projects" (openprinting.github.io/projects) we should not mention ippusbxd, as this project is discontinued. Instead ipp-usb should be mentioned. |
Migrate the OpenPrinting website to the Next.js rebuild
This PR replaces the current Jekyll site with the new Next.js + Tailwind + Framer Motion rebuild, while preserving the complete existing Git history. It is opened as a draft for maintainer review — it does not change
masteror any repo settings on its own.History preservation (most important)
This is a merge of two previously-unrelated histories, not a force-push:
master— 7 years of OpenPrinting site historygit log. Authors such as Michael R Sweet, Till Kamppeter, Zdenek Dohnal, dependabot, etc. are fully preserved on the first-parent history.git log --first-parentcontinues to show the originalmastertimeline, with this merge on top.What changed in config for production
config/site.config.ts): defaults to""(domain root). This is the org root Pages site (https://openprinting.github.io/), so a project-style/openprinting.github.ioprefix would 404 every asset/CSS/JS/link.?? ""keeps an explicitNEXT_PUBLIC_BASE_PATHoverride possible for sub-path previews.OpenPrintingso repo slug, links, and Giscus mapping target this repository.repoIdnow points at this repo. This repo has no "Blog Comments" discussion category, so comments currently map to General.categoryIdinconfig/site.config.ts.build.yml/deploy.ymlnow trigger onmaster(wasmain).GitHub Pages for this repo is currently the legacy Jekyll builder (
build_type: legacy, sourcemaster/root). This PR's tree is Next.js, not Jekyll. Before/when this lands onmaster, Pages "Build and deployment → Source" must be switched to "GitHub Actions" (the includeddeploy.ymlbuilds the static export and publishes it). Otherwise Pages will try to Jekyll-build a Next.js tree and the live site will break. There is no custom domain (cname: null), so no CNAME handling is needed.Validation performed locally
tsc --noEmittypechecknext lint(no warnings/errors)https://openprinting.github.io/...)next buildruns the Foomatic prebuild which needs Linux-only system packages — it runs in CI (build.yml) on this PR.Rollback
Trivial and safe:
masteris untouched. If anything is wrong, close the PR (and, if already merged, the merge can be reverted; the legacy Pages source can be restored). No history is lost either way.