Next.jsHTMLReact企业官网

lava_landing_page_nextjs — Next.js 企业官网模板

作者 jadogeri

将 TemplateMo 的 Lava Landing Page 静态模板迁移为基于 Next.js App Router 的单页应用,通过静态导出部署到 GitHub Pages。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

2 个预览视图
桌面端首页1 / 2
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 2

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-14查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

从静态多文件 HTML + jQuery 模板迁移为 Next.js App Router 单页应用

02

使用 output: 'export' 生成静态 HTML 导出产物

03

交互逻辑改用 useState、useEffect 等 React Hook 管理

04

保留 Bootstrap v4 栅格与模板自带 CSS、字体、图片资源

05

通过 .github/workflows/deploy.yml 自动构建并发布到 GitHub Pages

06

README 记录了 hydration 空白冲突、导航脚本冲突与子路径资源 404 的处理方式

模板详细介绍

该仓库把原本由多文件 HTML 和 jQuery 构成的 Lava Landing Page 模板改写为 Next.js App Router 单页应用:页面拆分为模块化 React 组件,交互由 useState、useEffect 等函数式 Hook 管理,样式沿用 Bootstrap v4 栅格与模板自带资源。构建使用 Next 的 output: 'export' 静态导出,产物通过 GitHub Actions 工作流发布到 GitHub Pages。README 记录了迁移中遇到的三类问题及处理方式:React 19 对根标签间空白字符的 hydration 报错、custom.js 中 jQuery 平滑滚动脚本与下拉导航的冲突,以及部署在子路径下导致的资源 404,分别通过调整 layout.tsx 标签写法、把下拉容器改为 button 并由 React state 控制、设置 basePath 解决。项目根目录下 lava/ 为应用子目录,另附原始模板压缩包。README 未说明测试、性能指标或除 GitHub Pages 之外的部署方式。

Next.jsHTML企业官网

适合你的项目吗?

适用场景

  • 想研究如何把传统 jQuery 静态模板改写成 Next.js 组件结构
  • 需要一个可静态导出并部署到 GitHub Pages 的落地页示例
  • 需要参考在子路径部署时设置 basePath 与 .nojekyll 的做法
  • 需要了解 React 19 下根布局标签空白导致 hydration 报错的排查思路

适合人群

  • 熟悉 React 与 Next.js 基础、希望参考模板迁移过程的开发者
  • 需要以 GitHub Pages 作为托管方式的静态站点项目
  • 想学习用 React state 替代 jQuery 控制下拉导航的实现方式

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    先克隆仓库,再进入 lava/ 子目录执行 npm install 与 npm run dev,本地预览地址为 http://localhost:3000/

  2. 2

    构建使用 npm run build,静态导出产物位于 lava/out 目录

  3. 3

    GitHub Actions 工作流默认在 ./lava 目录下运行,并上传 ./lava/out 作为 Pages 制品

  4. 4

    部署在子路径时需在 next.config.ts 中配置 basePath,并保留 public/.nojekyll 以跳过 Jekyll 处理

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-14。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 88 / 100
技术栈
Next.js · HTML · React
网站类型
企业官网
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-05-13
截图检查日期
2026-10-14

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: codex-user-requested-batch-review-20261015 · 2026-10-15

查看当时使用的来源资料

SHA-256: 4a088606f162e625787c64b2a92b1e18568832169fb5450f5a712dfe12ea8239

2026-10-14T19:13:02.825Z

来源文件 / 仓库
# 🚀 Lava Landing Page – Modernized with Next.js

**Author:** Joseph Adogeri  
**Version:** 1.0  
**Date:** April 26, 2026  

<div align="center">
  <img src="https://blog.logrocket.com/wp-content/uploads/2021/01/Screen-Shot-2021-01-28-at-10.58.42-AM.png" alt="NextJS Logo" width="400">
</div>

  <!-- Production Infrastructure Badges -->
  [Deployment - Live Web Application](https://jadogeri.github.io/lava_landing_page_nextjs/)  
  [Code Repository - GitHub](https://github.com/jadogeri/lava_landing_page_nextjs)

  ### 🌐 [Interactive Interface Live on GitHub Pages](https://jadogeri.github.io/lava_landing_page_nextjs/)


---

## 📄 Description

This repository presents a fully modernized transformation of the classic **Lava Landing Page** template. Originally authored as a static, multi-file HTML configuration backed by heavy jQuery frameworks, this codebase completely migrates the architecture into a single-page application (SPA) environment built on **Next.js 15 (App Router)**. 

By decoupling presentation layouts into modular React components, replacing broken template asset routing with environment variables, and utilizing automated GitHub Actions pipelines, this website compiles natively into clean, highly optimized static assets deployed straight through GitHub Pages.

## Acknowledgments

This website template was derived from the [Lava Landing Page](https://templatemo.com/tm-540-lava-landing-page) template by [TemplateMo](https://templatemo.com).

---


## 📍 Table of Contents

*   [🛠 Tech Stack Architecture](#-tech-stack-architecture)
*   [📦 Local Environment Setup](#-local-environment-setup)
*   [🤖 Automated Deployment Pipeline](#-automated-deployment-pipeline)
*   [🧠 Post-Mortem Technical Challenges & Breaks](#-post-mortem-technical-challenges--breaks)
*   [📄 Project Directory Layout Map](#-project-directory-layout-map)
*   [📜 Open-Source Licensing](#-open-source-licensing)

---

## 🛠 Tech Stack Architecture

*   **Application Framework:** [Next.js 15](https://nextjs.org) (Utilizing App Router layout structures).
*   **Compilation Execution:** Native Static HTML Exports via Next `output: 'export'` configuration settings.
*   **Interactivity Management:** Functional React Tree Hooks (`useState`, `useEffect`) executing dynamic client-side evaluations to prevent layout conflicts.
*   **Styling & Structure:** Native integration of clean Bootstrap v4 grid columns and custom template asset wrappers.
*   **Automated Continuous Deployment:** GitHub Actions pipeline checking dependencies and publishing to GitHub Pages.

---

## 📦 Local Environment Setup

Initialize your system components and execute local development previews via your primary CLI:

```bash
# 1. Clone your target repository files down locally
git clone github.com
cd lava_landing_page_nextjs

# 2. Step inside the application sub-workspace container
cd lava

# 3. Download the exact required module tracking files
npm install

# 4. Spin up your automated compilation watcher thread
npm run dev
```
👉 *Your localized Next.js staging page will establish an operational listener at: `http://localhost:3000/`*

---

## 🤖 Automated Deployment Pipeline

The workflow logic inside `.github/workflows/deploy.yml` completely automates the tracking of source changes pushed to your repository. It intercepts modifications, dives into your subfolder directory, triggers a static build run, and updates the live GitHub Pages servers:

```yaml
# Inside .github/workflows/deploy.yml
defaults:
  run:
    working-directory: ./lava # Restricts code processes directly to your inner directory

steps:
  - name: Checkout Source Code
    uses: actions/checkout@v4

  - name: Compile and Export Static HTML
    run: npm run build # Outputs clean flat assets into an inner /out directory

  - name: Upload Build Artifacts
    uses: actions/upload-pages-artifact@v3
    with:
      path: ./lava/out # Deploys directly to the target public domain endpoint URL
```

---

## 🧠 Post-Mortem Technical Challenges & Breaks

### **Whitespace Hydration Node Conflicts**
*   **The Problem:** React 19 rules threw critical runtime failures because the formatter injected unexpected space characters or hidden line breaks between structural root tags (`<html>`, `<head>`, and `<body>`).
*   **The Fix:** Re-aligned structural syntax markers flush against each other (e.g., `><head>`) within your core `layout.tsx` wrapper to isolate properties cleanly without structural parsing issues.

### **Legacy Navigation Script Collisions**
*   **The Problem:** Template script structures inside `custom.js` attached smooth-scrolling animation layers onto **every single link**. Clicking the nav dropdown caused fatal errors (`Cannot read properties of undefined (reading 'top')`) because empty path hashes returned undefined layout calculations.
*   **The Fix:** Converted dropdown containers into strict `<button>` components. This bypasses jQuery anchor listener criteria completely, letting React state (`useState`) control menus securely without crashing runtime processes.

### **Production Asset 404 Resolution**
*   **The Problem:** Standard slash shortcuts (`/assets/`) broke when deploying to production because the site serves from a subfolder (`/lava_landing_page_nextjs/`) rather than a domain root.
*   **The Fix:** Configured a persistent `basePath` rule inside your `next.config.ts` mapping framework, and updated source paths to evaluate using clean context variable strings.

---

## 📄 Project Directory Layout Map

```text
📂 lava_landing_page_nextjs/ (Workspace Root)
├── 📂 .github/workflows/
│   └── 📄 deploy.yml             # 🚀 Automated GitHub Actions CI/CD Pipeline Configuration
├── 📂 lava/                      # 🌐 APPLICATION SUBFOLDER WORKSPACE (Next.js Application Root)
│   ├── 📂 app/
│   │   ├── 📄 globals.css        # Global CSS Framework System Overrides
│   │   ├── 📄 layout.tsx         # Root Structural Layout (Asset Scripts & Link Engine Injection)
│   │   └── 📄 page.tsx           # React Component Workspace Migration of the Lava Template
│   ├── 📂 public/
│   │   ├── 📄 .nojekyll          # Instructs GitHub to bypass processing engines for _next subfolders
│   │   └── 📂 assets/            # Native template assets (css, fonts, images, custom scripts)
│   ├── 📄 next.config.ts         # Static Compiler Target Logic & Subfolder BasePath Mapping Rules
│   └── 📄 package.json           # Node Module Tracking & Dependency Framework Scripts
├── 📄 templatemo_540_lava_landing_page.zip # Historical Template Backup Archive File Source
└── 📄 README.md                  # Complete System Technical Documentation Mapping
```

---

## 📜 Open-Source Licensing

All foundational resource blocks and original script codes contained within this workspace are distributed under the **MIT License Rules**. You are free to modify, duplicate, and push additions according to standard usage profiles.
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。