Repository navigation
Give /playground its own heading and prerendered copy - #1
Merged
Merged
Conversation
The playground page gets an H1 matching its title, "Online Luau & Lua Editor", in the header where the "Playground" pill was, and a 146-word section below the first screen that targets the "luau online compiler" and "luau editor" queries and links to the homepage FAQ. The header and that section move into PlaygroundShell, which the postbuild prerenders into dist/playground/index.html so crawlers that don't run JS see them, and which App's Suspense fallback reuses so nothing shifts while the editor chunk loads. The homepage's "Three steps. Zero setup." and "Questions, answered" headings become "How to run Luau online" and "Luau & Lua playground FAQ". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On desktop the "Online Luau compiler and Lua interpreter" section becomes a card floating over the bottom of the output pane, with a close button. It takes no layout, so header and workspace fill the first screen again and scrolling over the editor no longer pulls the page down to the text. Closing it sets weblua:about-dismissed in localStorage, and index.html's pre-paint script hides the card on later visits before it can flash. Crawlers keep no storage between loads, so they always get the text, as does every first-time visitor. On phones the section stays in flow under the panes, below the first screen, as before; only the close button is new. The embed route still has no about text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PytechNo
added a commit
that referenced
this pull request
Oct 30, 2026
Searches for "luau playground" and "lua playground" have a ceiling: at #1 for every playground query Weblua already appears for, it would get about 1,700 clicks a month. /lua-formatter and /luau-type-checker target other searches ("lua formatter online", "luau type checking", "luau strict mode") where no online StyLua page or browser type checker turned up. Both are the playground with a tool route: getAppRoute maps the path to a ToolPage, PlaygroundShell swaps in that tool's <h1> and about text, and the workspace opens on the tool's demo (toolExamples, kept out of the example picker). The formatter demo is unformatted Lua 5.4; the type checker demo is strict Luau with one deliberate error, a string price. Tool pages neither restore nor autosave the draft, and Start over leaves it alone, so a quick format or check can't overwrite /playground's work. The postbuild prerenders each page with its own title, description, and canonical. The sitemap lists them, nginx folds their trailing-slash variants, the homepage footer and the /playground about text link to them, and they link to each other. Tests pin both demos: the formatter one changes when formatted, and the checker one has exactly one error, on the "80" line. The todo gains section 11 with the remaining pages in order: Lua vs Luau, a pattern tester, the "online lua compiler" queries, runnable examples, 5.1 vs 5.4, table to JSON, a bytecode viewer, and Learn Luau, plus the exploit searches to avoid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two of the search ranking tasks from
todo.md(section 9)./playground<title>. It sits in the header where the "Playground" pill was; "Weblua" in the logo is now a plain span.PlaygroundShellcomponent:scripts/postbuild.mjsprerenders it intodist/playground/index.html, so crawlers that don't run JS see the heading and copy. The postbuild now fails if either prerendered page lacks an<h1>.App's Suspense fallback renders the same shell, so nothing flickers while the editor chunk loads.About text as a dismissible card (64394e0)
weblua:about-dismissedin localStorage.index.html's pre-paint script (the one that applies the theme) hides the card on later visits before it can flash./embedstill has no about text.Homepage headings
Verification
npm run buildpasses (tsc -b,vite build, postbuild).dist/playground/index.htmlcontains the H1, the about text, the close button, and the pre-paint check.npm test: 26 files, 456 tests pass./embedrenders no card.🤖 Generated with Claude Code