Quickstart
This quickstart walks you through creating a documentation site for MyProduct integrated with the my-docs GitHub repository and deployed to Vercel.
Requirements
Before you begin, install and set up the required software and environments.
Node.js and Node Package Manager
On your local machine, install:
-
Node.js 20.9.0 or later, the minimum version that Next.js 16 supports
-
Node Package Manager (
npm), which is bundled with Node.js
GitHub account and repository
Create the repository
On GitHub, using an existing account or a new account, create a new
repository named my-docs.
Leave the new repository empty. Don't add a README, .gitignore, or license.
Configure the Vercel app
In the repository settings, click Installed GitHub Apps, confirm Vercel is installed, and click Configure.
Grant repository access
In the Repository access section, select the repository you created,
my-docs, or allow access to all repositories.
Vercel account and project
Import the repository
In Vercel, using an existing account or a new account, import
the GitHub repository, my-docs, and click Deploy.
Leave the build settings at their defaults. Vercel detects the Next.js static export automatically.
You can ignore the warning about the missing branch.
Copy the domain
From the Dashboard, click the card for the new project, my-docs, and copy
the domain that Vercel assigned to it, <your-vercel-domain>, from the
Domains list.
Set the site URL
Navigate to Environment Variables, add the following key and value, and click Save:
-
Key:
SITE_URL -
Value: your assigned domain, including
https://, for example,https://my-docs-black-chi.vercel.app
SITE_URL doesn't change where the site deploys. Beacon uses it to
build absolute links in canonical tags, sitemap.xml, and /llms.txt.
Install and run Beacon
Install Beacon on your local machine.
Create the site
Create a new site, my-docs:
npm create beacon-docs@latest my-docsWhen prompted, enter the project name, my-docs, and the product name, MyProduct.
The command performs the following tasks:
-
Downloads Beacon.
-
Adds starter pages.
-
Saves the product name in
.env.local. -
Creates a local Git repository with an initial commit.
-
Installs the dependencies.
Change to the project directory
cd my-docsStart the development server
Start a local development server to preview your changes as you edit the content in the next section:
npm run devThe development server runs at
http://localhost:3000 and renders each page when
you request it, but doesn't write the site to the out/ directory.
Changes to content/nav.config.ts reload automatically. To see changes to
.mdx files, refresh the browser.
Add a documentation page
Create the page file
Create a file under content/docs/ for the new page,
content/docs/my-page.mdx.
Add frontmatter and content
In the new page, add a frontmatter block with a title and description:
---
title: My Page
description: A short, specific summary of what this page covers.
---
# My Page
This is the content for MyProduct.Beacon picks up the file automatically and adds it to the client-side search index.
The build also adds it to the sitemap.
Add the page to the navigation
In content/nav.config.ts, add an entry for the new file to a group's
items array, for example, the Get Started group:
{ title: "My Page", href: "/my-page" }View the page
With the development server running, open http://localhost:3000/my-page to view the new page.
Stop the development server
Press Ctrl+C.
Push the changes to GitHub
Commit the changes
On your local machine, commit the page that you added, my-page.mdx, and the
content/nav.config.ts file:
git add .
git commit -m "Add my page"Connect the remote repository
Connect your local repository to the new GitHub repository. Replace
<your-github-username> with your GitHub username:
git remote add origin https://github.com/<your-github-username>/my-docs.gitPush to main
Push the changes to the main branch:
git push -u origin mainIn a production repository, you typically don't push directly to main. The quickstart does this only for simplicity.
Tip
If the push fails with Password authentication is not supported for Git operations, GitHub rejected your account password.
-
If you've added an SSH key to your GitHub account, switch the remote to SSH by running
git remote set-url origin git@github.com:<your-github-username>/my-docs.git, and then push again. -
Otherwise, when Git prompts for a password, enter a personal access token instead.
Deploy to Vercel
Deploy the site to Vercel to publish the new documentation.
Vercel builds the site from the GitHub repository when you push to the main branch.
Deploy the site
In the Vercel dashboard, click Deploy. After the first deployment, every
push to main triggers a new production deployment, and pushes to other
branches create preview deployments.
View the live page
Open https://<your-vercel-domain>/my-page to view the new page.
Clean up
If you don't want to keep the quickstart project:
-
Delete the GitHub repository,
my-docs. -
Remove the Vercel project,
my-docs. -
Remove the local project directory,
my-docs, from your machine.