FIELD GUIDE / STATIC PUBLISHING
Publish with purpose.Release with evidence.
A dependable static publishing workflow starts with useful source content, generates complete HTML for every published URL and checks the exported files before deployment. Use one canonical origin, explicit draft rules and a repeatable release process. Search and AI discovery depend on accessible, useful content; metadata alone cannot guarantee visibility.
01
1. Decide what the static host will serve
Static export is a hosting decision: the host receives files rather than a running Next.js application server.
According to the Next.js static export documentation, build-time output can be hosted by a server that serves HTML, CSS and JavaScript. Features requiring request-time server behavior need another design.
| Requirement | Approach to evaluate |
|---|---|
| Public articles known at build time | Export pages during the build |
| Local menu or interactive calculator | Client-side behavior on the static page |
| A contact submission | Separate form endpoint or a direct contact link |
| Private account data or request-time personalization | An application backend with appropriate access control |
| A secret API credential | Keep it out of the exported client assets |
The official guide lists Server Actions, ISR and the default image-optimization loader among unsupported static-export features. Verify the feature boundary before selecting a host, rather than discovering it during deployment.
02
2. Give every article a content contract
The content model should make it difficult to publish an incomplete page accidentally.
For a hypothetical engineering notebook, require these fields:
slug permanent URL segment
title the question or decision the page covers
description a concise account of the article’s value
published actual first release date
updated date of a meaningful content revision
draft excluded from all public outputs when true
author a real, linked identity
answer the short conclusion near the opening
sections explanations, examples and limitations
references primary sources supporting technical claims
Keep the article’s public URL independent from its headline. A clearer title does not necessarily require a new slug. Changing the URL creates a migration problem that a static host may not solve through Next.js redirect configuration.
Draft status must affect every public output: HTML routes, index cards, feeds, sitemaps, text exports and generated assets. Removing a card from the index is not the same as withdrawing a page.
03
3. Answer a specific problem before optimizing discovery
A useful article helps a reader make or implement a decision.
Replace a broad topic such as “SaaS tips” with a bounded question such as “Which access checks should a workspace export perform after membership is revoked?” Then write the answer and the example that supports it.
Use a simple editorial sequence:
- State the problem and who it affects.
- Give the answer with its assumptions.
- Work through an example that changes the reader’s understanding.
- Explain a failure case or a limit.
- Link primary references and a useful next step.
Google’s helpful-content guidance is a useful editorial reference. In this workflow, a reviewer should be able to point to what the article adds: a decision table, a tested observation, a worked scenario or a clearly explained tradeoff.
AI can help draft or restructure prose, but the named author still needs to review the claims and examples. Do not present a generated scenario as a client result.
04
4. Build every published route into the artifact
A direct article URL should return the article, not depend on arriving through the home page.
A minimal export configuration for a root-hosted site can look like this:
const nextConfig = {
output: 'export',
trailingSlash: true,
images: { unoptimized: true },
};
export default nextConfig;
For parameterized article routes, enumerate published slugs with generateStaticParams. This is a sketch of the route contract, not a complete application:
export const dynamicParams = false;
export function generateStaticParams() {
return publishedPosts.map(post => ({ slug: post.slug }));
}
The export produces the content available during that build. A future date in an article does not schedule a deployment. If you want timed releases, the release workflow must run at the intended time and apply an explicit publication rule.
Preview the exported directory as static files. Development mode can hide assumptions that do not hold on the final host.
05
5. Keep URLs and metadata consistent
Choose the public origin once, then use it consistently across the page and its discovery files.
For a site on a custom domain, use that domain in the canonical URL, social metadata and sitemap. Keep repository-hosted preview URLs out of production metadata. Google’s canonical guidance explains how canonical signals help identify preferred URLs; a tag is not a replacement for checking the deployed domain behavior.
| Output | What to verify |
|---|---|
| Title and description | Unique and faithful to the article |
| Canonical | The intended public article URL |
| Open Graph and Twitter | Correct title, description, image and image dimensions |
| Structured data | The visible author, headline, dates and page type |
| Sitemap | Published canonical HTML pages only |
| RSS | Stable item URLs and actual publication dates |
A project site beneath /repository-name/ has different path requirements from a custom-domain site at /. Test asset links and direct navigation for the actual deployment shape.
06
6. Make the same content useful to search and AI systems
Readable explanations and reliable attribution matter more than decorating a page with an AI-focused acronym.
Google’s generative search guidance continues to emphasize SEO fundamentals, useful content, accuracy and a clear technical structure. Eligibility does not guarantee indexing or appearance.
Apply that to the article itself: keep the main answer in accessible text, use descriptive headings, show the author, cite supporting references and make related pages discoverable through ordinary links.
Plain-text or llms.txt exports can provide another representation of the site. Treat them as optional outputs that must agree with the HTML, not a guarantee of inclusion or citation by any service. An archived article should not survive in those files.
For the hypothetical notebook, test whether a reader can quote the opening answer without losing an essential limitation. If the limitation changes the recommendation, keep it next to the answer rather than hiding it in a footer.
07
7. Validate the exported files, including removal
A successful compilation does not prove the release contains the right pages.
Create a release gate against the artifact:
| Check | Failure it can catch |
|---|---|
| Every expected HTML path exists | Missing static parameters |
| Withdrawn routes and assets are absent | Stale build or generated files |
| Local links and section anchors resolve | Links to removed articles |
| Main text exists without a browser fetch | An empty client-only shell |
| Metadata points to the public origin | Preview-host URLs leaking into release |
| Schema and visible dates agree | Inconsistent author or publication fields |
| Images fit and tables scroll locally | Narrow-screen overflow |
For this repository, the release commands are:
npm run build
npm run typecheck
npm run check:export
Also open a direct article URL in the static preview. Check the important interaction with a keyboard. A machine check can confirm that a heading exists; it cannot decide whether the explanation is clear or accurate.
08
8. Separate source, build and deployment
The deployable object is the reviewed export, not the working directory that produced it.
GitHub’s Pages workflow documentation describes building a Pages artifact and deploying it through Actions. Keep the steps conceptually separate even when a single workflow runs them.
For this site, build inside the Next.js subfolder and publish the contents of out/. Keep the custom-domain configuration and hidden hosting files with the artifact. Do not overwrite the source tree with exported files as a development shortcut.
A private source repository can protect source history and unpublished working material. The deployed HTML, JavaScript and public assets remain inspectable by visitors. If you use a separate public hosting repository, scope its deployment credential to the access actually required.
Before a release, identify the previous known-good export or commit and how to restore it. Keep the content revision and the deployment that published it traceable.
09
9. Review the live result and improve one thing at a time
After deployment, check what the public host serves before evaluating traffic.
Open the public article URL directly. Check domain redirects, canonical metadata, the missing-page response and one social-image URL. Then submit or monitor the sitemap in the relevant webmaster account.
For editorial improvement, record observations rather than attributing every movement to the last edit:
- Which queries or referrals bring relevant readers?
- Which landing page answers the intended question poorly?
- Are users finding the guide or resource linked from the article?
- Has a framework change made a command or explanation stale?
Keep a small change log: what changed, why, when it shipped and what you will examine later. A newly deployed page may need time to be discovered; a finished checklist is not evidence of organic visibility.
10
10. Use a weekly routine with a stop condition
The routine should protect editorial quality without turning every post into a platform project.
Draft: choose one problem and produce the answer, example and references.
Review: verify claims, dates, authorship and the limits of the recommendation.
Build: generate the article and all discovery outputs from the same published-content list.
Inspect: check direct navigation, a narrow screen and the release gate.
Deploy and verify: publish the artifact and check the real URL.
Stop the release if the article’s central claim lacks support or the exported route is wrong. Resolve that issue instead of adding more keywords. Use the linked publishing checklist as a reusable review aid.
A few practical answers
Can a Next.js static blog run on GitHub Pages?
Yes, when its pages and assets are exported at build time. Features that require a Next.js application server need a different hosting design or a separate backend.
Does a new post require rebuilding a static site?
Yes. The static host serves the exported files. New content and meaningful edits need a new build and deployment.
Does llms.txt guarantee AI citations?
No. A text export is an optional representation of the content. It does not guarantee discovery, inclusion or citation by a search or AI service.
Should a private source repository contain the deployed site?
Keep the build and deployment boundaries clear. The source can be private, but anything shipped in the public artifact must be suitable for public access.
What should I test when removing an article?
Check that its route, generated assets, index links, sitemap entry, feed item and text exports are all absent, and verify the live host’s response after deployment.
References & further reading
EXPLORE NEXT
Weekly publishing checklist
A repeatable review for content, metadata and the release artifact.
See a complete published article
Explore the buyer guide’s answer, references and comparison tables.
Architecture decision record
Document the hosting choice and conditions for revisiting it.