AstroLaravelCorporate Website

laravel-astro-landing — Astro Business Template

By lauroguedes

Put an Astro static landing page into a Laravel repository as a development dependency, and use artisan commands to create, run, and deploy the landing page separately.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

1 previews
Author preview
Author-provided preview

Preview provided in the project README.

One original preview is available. Open the full image to inspect the design.

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-13View source

What stands out

A quick read of the recorded project description.

01

Create an Astro project in the landing/ directory with a single landing:install command, supporting empty templates, official examples, any repository, and free astro.build themes

02

The installer automatically publishes config/landing.php, updates .gitignore, excludes the landing page directory in Tailwind v4's app.css, and writes LANDING_URL

03

composer run dev can start the Astro development server as an additional process, and landing:dev and landing:build can also be run and built separately

04

landing:workflow generates a GitHub Actions workflow that only listens for changes under landing/**, supporting Cloudflare Pages, Netlify, Vercel, GitHub Pages, and SSH deployment

05

Optionally redirect the Laravel root route to LANDING_URL; when this variable is not set, the original homepage behavior is preserved

06

Provides guidance and the astro-landing-development skill for Laravel Boost, making it easier for AI agents to understand how the landing page is built and deployed

Template Details

This is a Laravel development dependency package for maintaining a separate Astro landing page in the same repository as a Laravel application. Its approach is to separate marketing pages from the application: the landing page is a static site, suitable for hosting on a CDN and maintained by the people writing the copy; the application requires PHP, a database, and migrations. The two stay in sync through the same repository but are not coupled to each other.

After installation, the landing:install command creates an Astro project in the landing/ directory. The source can be an empty template, an official example, any Git repository, or a free theme from astro.build/themes. The installer publishes config/landing.php, updates .gitignore, adds @source not in Tailwind v4's app.css to exclude the landing page directory, writes a GitHub Actions workflow, adds LANDING_URL to .env, and optionally redirects the application root route to the landing page. Existing files are not overwritten unless --force is explicitly used.

For running, Laravel 13.16 and above can use composer run dev to start the landing page as an additional process on port 4321; landing:dev and landing:build can also be run separately. Deployment is handled by a GitHub Actions workflow generated by landing:workflow, supporting Cloudflare Pages, Netlify, Vercel, GitHub Pages, and self-hosted SSH servers. The workflow only listens for changes under landing/**.

Limitations and prerequisites: the package itself is a development dependency and does not participate in server-side runtime; it requires PHP 8.3+, Laravel 12 or 13, and Node.js 22.12+ or Bun. Paid themes do not have public repositories, so you need to purchase them yourself and then install with --template=owner/repo.

AstroLaravelCorporate website

Is it right for your project?

Use Cases

  • A Laravel application needs a separately maintained, statically hosted marketing landing page while keeping it in sync with the application code in the same repository
  • You want to quickly set up a landing page using an official Astro example or a free astro.build theme without configuring the build process from scratch
  • You need to deploy the landing page to Cloudflare Pages, Netlify, Vercel, GitHub Pages, or your own server, and have deployment trigger only when the landing page changes
  • You want the application root path to automatically redirect to the landing page, or to mount the landing page under a subpath of the application domain (such as /lp)

Suitable For

  • Projects using Laravel 12 or 13 and PHP 8.3+, where the team is willing to maintain both the application and a static landing page in the repository
  • Teams that need to deploy and host the landing page separately from the application while keeping the same pull request and issue workflow
  • Projects where the landing page is maintained by non-PHP developers (such as copywriters or designers) through an Astro template

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Install as a development dependency: composer require lauroguedes/laravel-astro-landing --dev, then run php artisan landing:install

  2. 2

    Environment requirements: PHP 8.3+, Laravel 12 or 13, and Node.js 22.12+ or Bun

  3. 3

    All interactive questions have corresponding command-line parameters, so --no-interaction can be used with --path, --template, --pm, --add, --deploy, --branch, --redirect-root, and other parameters for unattended installation

  4. 4

    The deployment workflow requires setting the repository variable LANDING_URL and configuring the corresponding secrets for the target platform (such as Cloudflare, Netlify, Vercel, or SSH credentials)

  5. 5

    Paid themes do not have public repositories; purchase them first and then install with --template=owner/repo. Third-party assets such as demo images and fonts need separate license verification

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This listing covers the free version under the MIT license in the public repository; the free scope is the code of that version and does not mean that external services or third-party assets are free.

Must comply with when using

  • The code of this version may be used, modified, used commercially, and distributed for free.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur separate charges.
  • This package is only a development dependency and does not run on the server serving the application; the landing page is deployed by GitHub Actions, not PHP.
  • Paid themes do not have public repositories; you need to purchase them yourself first, then install with --template=owner/repo.
  • Each deployment workflow requires setting the repository variable LANDING_URL (the public address of the landing page).
  • Deploying to Cloudflare Pages requires configuring the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID secrets.
  • Deploying to Netlify requires configuring the NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID secrets.
  • Deploying to Vercel requires configuring the VERCEL_TOKEN, VERCEL_ORG_ID, and VERCEL_PROJECT_ID secrets.
  • Deploying to a self-hosted SSH server requires configuring secrets such as LANDING_SSH_HOST, LANDING_SSH_USER, LANDING_SSH_KEY, and LANDING_SSH_PATH.
  • Running requires PHP 8.3+, Laravel 12 or 13, and Node.js 22.12+ or Bun.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

It is a development dependency: nothing in it runs on the server that serves your application.

Original README

Paid themes have no public repository; the installer says so and links to where to buy one, which you then install with `--template=owner/repo`.

Original README

Every workflow needs the repository variable `LANDING_URL`, the landing's public URL.

Original README

| `cloudflare-pages` | `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID` |

Original README

| `netlify` | `NETLIFY_AUTH_TOKEN`, `NETLIFY_SITE_ID` |

Original README

| `vercel` | `VERCEL_TOKEN`, `VERCEL_ORG_ID`, `VERCEL_PROJECT_ID` |

Original README

| `ssh` | `LANDING_SSH_HOST`, `LANDING_SSH_USER`, `LANDING_SSH_KEY`, `LANDING_SSH_PATH`; optional `LANDING_SSH_PORT`, `LANDING_SSH_KNOWN_HOSTS` |

Original README

- PHP 8.3+, Laravel 12 or 13 - Node.js 22.12+ (or Bun) for Astro

Original README
https://github.com/lauroguedes/laravel-astro-landing/blob/main/LICENSE.mdhttps://github.com/lauroguedes/laravel-astro-landing/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-13. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
Partly documented · 73 / 100
Technologies
Astro · Laravel
Website type
Corporate Website
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-10-13
Screenshot last checked
2026-10-13

No demo link is recorded. Use the repository instructions to evaluate the project locally; the screenshot alone cannot establish interactive behavior.

The catalog identifies Astro as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-13

Inspect the recorded source material

SHA-256: 9dbc2077ce3e5deafebb595b817f3390c7e35cb899bb1102a8ffee9467413d07

2026-10-13T07:38:33.639Z

Source file / repository
# Laravel Astro Landing

[![Tests](https://github.com/lauroguedes/laravel-astro-landing/actions/workflows/tests.yml/badge.svg)](https://github.com/lauroguedes/laravel-astro-landing/actions/workflows/tests.yml)
[![Latest Version](https://img.shields.io/github/v/release/lauroguedes/laravel-astro-landing?style=flat&label=packagist&cacheSeconds=3600)](https://packagist.org/packages/lauroguedes/laravel-astro-landing)
[![Downloads](https://img.shields.io/packagist/dt/lauroguedes/laravel-astro-landing?style=flat&cacheSeconds=3600)](https://packagist.org/packages/lauroguedes/laravel-astro-landing/stats)
[![License](https://img.shields.io/badge/License-MIT-green?style=flat)](LICENSE.md)

Keep an [Astro](https://astro.build) landing page in the same repository as your
Laravel application, and deploy it somewhere else.

<img width="2172" height="724" alt="Laravel + Astro Glassmorphism Banner" src="https://github.com/user-attachments/assets/649cff0c-bf64-4e5a-95cc-baf7d1583cc4" />

A product's marketing site and the product itself change for different reasons
and belong on different servers: the landing is static, cheap to host on a CDN
and edited by whoever writes the copy; the application needs PHP, a database and
a deploy that runs migrations. Keeping them in one repository keeps them in sync
(same pull requests, same issues, and a landing that links to the routes that
actually exist), as long as nothing couples them.

This package is the decoupling, set up in one command:

- **`landing:install`** creates the Astro project in `landing/` from an empty
  template, an official example, any template repository, or a free theme from
  the [Astro themes catalog](https://astro.build/themes/).
- **`composer run dev`** starts the landing next to the application (Laravel 13.16+).
- **`landing:workflow`** writes a GitHub Actions workflow that builds and deploys
  the landing to Cloudflare Pages, Netlify, Vercel, GitHub Pages or your own
  server, and runs only when the landing changed.

## Installation

```bash
composer require lauroguedes/laravel-astro-landing --dev
php artisan landing:install
```

It is a development dependency: nothing in it runs on the server that serves
your application. The landing is deployed by GitHub Actions, not by PHP.

`landing:install` asks where the landing lives, what it starts from, which
package manager to use, where it deploys, where visitors will reach it, and
whether the application's home page should send them there (plus, for an empty
project, which integrations to add). Then it runs `create-astro`, installs the
dependencies and wires the rest:

```
 ┌ What should the landing start from? ─────────────────────────┐
 │ › ● An empty project: Astro's minimal template               │
 │   ○ An official Astro example                                │
 │   ○ A template repository on GitHub, GitLab or Bitbucket     │
 │   ○ A free theme from astro.build/themes                     │
 └──────────────────────────────────────────────────────────────┘
```

| What it does | Why |
|---|---|
| Creates `landing/` with `create-astro` | Its own `package.json`, lockfile and build |
| Publishes `config/landing.php` | Where the landing is, for every other command |
| Adds `landing/node_modules`, `dist`, `.astro` to `.gitignore` | Not every template ignores them |
| Adds `@source not '../../landing';` to `resources/css/app.css` | Tailwind v4 scans the whole project and would put the landing's classes in the application's CSS |
| Writes `.github/workflows/deploy-landing.yml` | If you chose a deploy target |
| Adds `LANDING_URL` to `.env` and `.env.example` | So the application knows where the landing is |
| Points `/` in `routes/web.php` at `LANDING_URL` | If you asked; see [Domains and routes](#domains-and-routes) |
| Sets `base` in the landing's `astro.config` | If the landing is served under a path |

Nothing that exists is overwritten without `--force`, and `.gitignore` and
`app.css` are only ever appended to.

### Starting from a template

```bash
php artisan landing:install --template=empty                 # Astro's minimal template
php artisan landing:install --template=blog                  # an official example
php artisan landing:install --template=onwidget/astrowind    # any repository
php artisan landing:install --template=https://github.com/owner/repo/tree/main/apps/site
php artisan landing:install --template=gitlab:owner/repo
php artisan landing:install --template=theme:landpack        # a theme from astro.build/themes
```

`theme:<slug>` (or the theme's `astro.build/themes/details/…` URL) is looked up
in the catalog and installed from the repository the theme links to. Paid themes
have no public repository; the installer says so and links to where to buy one,
which you then install with `--template=owner/repo`.

### Unattended

Every question has a flag. With `--no-interaction` the defaults are `landing/`,
the empty template, the application's package manager and no workflow.

```bash
php artisan landing:install --no-interaction \
  --path=landing --template=basics --pm=bun \
  --add=tailwind --add=sitemap \
  --deploy=cloudflare-pages --branch=main \
  --redirect-root
```

## Domains and routes

The landing and the application are two sites, and the recommended setup gives
each its own address:

| | Production | Local |
|---|---|---|
| Landing | `https://example.com` | `http://localhost:4321` |
| Application | `https://app.example.com` | `php artisan serve`, Herd, Valet |

The application learns where the landing is from `LANDING_URL`
(`config('landing.url')`). With `--redirect-root` (or *yes* to the question),
the installer rewrites the application's home route to redirect there:

```php
Route::get('/', function () {
    return config('landing.url')
        ? redirect()->away(config('landing.url'))
        : view('welcome');
})->name('home');
```

It is plain Laravel reading the application's own config, so it keeps working in
production, where this package is not installed, and wherever `LANDING_URL` is
not set it serves the page it served before.

To serve the landing under a path of the application's domain instead, such as
`example.com/lp`, install with `--base=/lp`: Astro then builds every link and
asset under `/lp/`, and one proxy rule on the application's domain sends `/lp/`
to the landing. [docs/domains.md](docs/domains.md) has the Nginx and Cloudflare
recipes for that, for serving the build from the application's own `public/`,
and for putting the application under paths of the landing's domain.

## Running it

On Laravel 13.16 and later, `composer run dev` (which runs `php artisan dev`) starts the
landing as one more process, at http://localhost:4321:

```
 landing php artisan landing:dev
 server  php artisan serve
 queue   php artisan queue:listen --tries=1 --timeout=0
 vite    npm run dev
```

On its own, or on earlier Laravel versions:

```bash
php artisan landing:dev     # astro dev
php artisan landing:build   # astro build, into landing/dist
```

Both install the landing's dependencies first when `node_modules` is missing, so
a fresh clone needs nothing beyond the application's own setup. Set
`LANDING_DEV=false` to keep the landing out of `composer run dev`.

## Deploying it

```bash
php artisan landing:workflow cloudflare-pages
```

Every workflow needs the repository variable `LANDING_URL`, the landing's
public URL. The build passes it to Astro as `--site`, so canonical links, Open
Graph URLs, the sitemap and `robots.txt` point at your domain whatever the
template's config says, and a build that still points at a placeholder such as
`https://example.com` is not deployed. See [docs/seo.md](docs/seo.md).

| Target | Repository secrets |
|---|---|
| `cloudflare-pages` | `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID` |
| `netlify` | `NETLIFY_AUTH_TOKEN`, `NETLIFY_SITE_ID` |
| `vercel` | `VERCEL_TOKEN`, `VERCEL_ORG_ID`, `VERCEL_PROJECT_ID` |
| `github-pages` | none |
| `ssh` | `LANDING_SSH_HOST`, `LANDING_SSH_USER`, `LANDING_SSH_KEY`, `LANDING_SSH_PATH`; optional `LANDING_SSH_PORT`, `LANDING_SSH_KNOWN_HOSTS` |

The workflow is filtered to `landing/**`, so a change to the application never
redeploys the landing. Do the reverse in your application's workflows:

```yaml
on:
  push:
    branches: [main]
    paths-ignore: ['landing/**']
```

Deploying to two places is two files:

```bash
php artisan landing:workflow cloudflare-pages
php artisan landing:workflow ssh --file=deploy-landing-mirror
```

To change every workflow this package writes, publish the stubs. They are read
from `stubs/landing/workflows` before the package's own:

```bash
php artisan vendor:publish --tag=landing-stubs
```

See [docs/deployment.md](docs/deployment.md) for each target in detail.

## Configuration

```php
// config/landing.php
'path' => env('LANDING_PATH', 'landing'),
'url' => env('LANDING_URL'),                            // where visitors reach the landing
'package_manager' => env('LANDING_PACKAGE_MANAGER'),   // null: the landing's lockfile decides
'dev' => [
    'enabled' => (bool) env('LANDING_DEV', true),      // part of composer run dev
    'name' => 'landing',
],
```

## Commands

| Command | What it does |
|---|---|
| `landing:install` | Create the Astro landing and wire it into the application |
| `landing:dev` | Run the Astro dev server |
| `landing:build` | Build the landing into its `dist/` |
| `landing:workflow` | Write a GitHub Actions workflow that deploys it |

## Working with an AI agent

If the application uses [Laravel Boost](https://laravel.com/docs/boost), this
package ships guidelines and an `astro-landing-development` skill. Run
`php artisan boost:install` and tick `lauroguedes/laravel-astro-landing` when it asks
which third-party guidelines and skills to install; the choice is saved to
`boost.json`, so later unattended runs keep it. They tell an agent that the
landing is a separate static site, which commands build and run it, how it
reaches the application, and how it deploys.

## Requirements

- PHP 8.3+, Laravel 12 or 13
- Node.js 22.12+ (or Bun) for Astro

## Documentation

[docs/](docs/README.md) covers templates, domains and routes, SEO, linking the
landing to the application, and each deploy target.

## License

MIT. See [LICENSE.md](LICENSE.md).
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.