larecipe:export writes your public doc sets to a folder of plain files: every page as HTML and as Markdown, llms.txt, skill.md, the sitemap, the search index and the UI. Any static host can serve the folder, and search keeps working because it runs in the browser.
php artisan larecipe:export --out=build/docs --base-url=https://docs.acme.dev--outis the folder to write, relative to your app's root unless it starts with/. It defaults tobuild/docs.--base-urlis where the files will be served. Canonical links, absolute URLs in the Markdown twins,llms.txtand the sitemap use it, and a base URL with a path (https://acme.github.io/docs) prefixes every link and asset. Without it, the export uses yourAPP_URLand says so.--setpicks the doc sets to export. Repeat it for several:--set=docs --set=api. Without it, every set is exported, and private sets are skipped.
Most apps serve their docs from the app itself, where gates, Ask AI, MCP and feedback work. Export when you need docs on a host that runs no PHP.
What a static site leaves out
Anything that needs a running app: Ask AI, the MCP server, page feedback, the server search endpoint and share links. The command prints this list on every run. Searches still work in the browser, but they no longer fire SearchPerformed. Forms and requests in your own custom components, such as this site's newsletter form, have no app to post to either.
Exported as a guest
The export reads your site the way a signed-out reader would, so private sets, versions and pages stay out, and gate blocks render as a guest sees them. Live references resolve at export time: export again after you change the routes or commands they show.
Details
What it writes
- index.html
- 404.html
- llms.txt
- skill.md
- sitemap.xml
- larecipe-assets/
- d6a0a96acf5f/
- brand/
- favicon.svg
- build/
- larecipe/
- 3.x/
- index.html
- index.md
- llms.txt
- llms-full.txt
- _search/
- e83bc2e9096f.b3d38bfc22f8.json
- operate/
- caching/
- index.html
- caching.md
- caching/
- 2.x/
- ar/
- Pages as
path/index.html, so a static host serves/3.x/operate/caching/without a rewrite rule, and each page's Markdown twin next to it aspath.md. - Agent files:
llms.txt,skill.mdandsitemap.xmlfor the set, andllms.txtandllms-full.txtfor each version. A set without versions gets onellms-full.txt. - The search index that guests download, one per version and language.
- The UI: LaRecipe's built files under
larecipe-assets/(orvendor/larecipe/when you published them), plus images and other files your pages point at that the app serves through its routes, and the stylesheets listed underassets.cssinlarecipe.json. - Files from your
public/folder that the exported pages reference, such as your logo and favicon, copied as they are: never PHP files, dot files or anything outsidepublic/. The build of your custom components inpublic/build/larecipe/is copied whole, because it loads chunks no page names. - The set's entry: its landing page, or a small page that redirects to the default version, and its not-found page as
404.html, for versioned and unversioned sets alike.
Pages are adjusted for a static host: links to other pages end in a slash, CSRF tokens are emptied, and the page is marked static, so the UI loads each page in full instead of asking the server for JSON. Exported pages leave out what would call your server: the feedback widget, Ask AI, the Connect MCP action and the palette's search reporting.
How the guest export works
The export sends each request through your app's own HTTP kernel, in the same process, with your middleware, gates and renderers. No server needs to run.
- Private sets (
access.modeset toauthorgate) are skipped and listed. A static host cannot check who is reading. - Private versions and pages are left out and counted in the list.
- Gate blocks (
<Can>and<Cannot>) render as a signed-out reader sees them. - Live references resolve at export time. A
<Route>or<Artisan>table holds the values your app had when you ran the export.
The requests carry the user agent LaRecipe-Export/3 (static export) and fire LaRecipe's traffic events like any other.
This site's export
Run while these pages were being written (the output folder shortened):
docs ......................................... 126 pages, 126 Markdown twins
Left out of the static site:
- Ask AI: it answers through your server and your AI provider.
- The MCP server: agents connect to a running app.
- Page feedback: it reports to your app as a FeedbackSubmitted event.
- Server search (/_search?q=): the static site searches in the browser.
- Share links: the server checks them.
INFO Wrote 443 files to /private/tmp/…/export.The 126 pages are every page of 3.x and 2.x twice: once in English and once under the Arabic URLs, where a page without a translation falls back to English, as it does on the live site.
Every option
larecipe:exportExport public doc sets as a static site
php artisan larecipe:export [--out [OUT]] [--set [SET]] [--base-url [BASE-URL]]| Option | Description | Default |
|---|---|---|
--out=OUT | The folder to write the site into | build/docs |
--set=SET | The doc sets to export (all public sets by default) | |
--base-url=BASE-URL | Where the site will be served from, for example https://docs.acme.dev |
Next
- Search: how the browser searches the exported index.
- Deployment: serving the docs from your app instead.
- Live references: what resolves at export time.