Skip to content

Add SSR preview generation for all languages#69

Merged
L3P3 merged 4 commits into
masterfrom
copilot/add-ssr-previews
Feb 4, 2026
Merged

Add SSR preview generation for all languages#69
L3P3 merged 4 commits into
masterfrom
copilot/add-ssr-previews

Conversation

Copilot AI commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Adds server-side rendering of the initial app state for each language build, enabling static HTML previews and improved SEO/accessibility.

Changes

  • package.json: Added lui-ssr:latest to devDependencies
  • build.js: Extended build_js() to generate SSR HTML after each language's JS compilation
    • Reads compiled app-{lang}.js and passes through lui_ssr()
    • Outputs pure HTML to dist/app-{lang}-ssr.html for all 5 languages (de, en, ru, tr, uk)
    • Includes error handling with language context for debugging

The existing GitHub Actions workflow already commits all dist/* files to the dist branch, so no workflow changes needed.

// Generate SSR preview
const app_js_content = await readFile(`./dist/app-${lang}.js`, 'utf8');
const ssr_html = lui_ssr(app_js_content)();
await writeFile(`./dist/app-${lang}-ssr.html`, ssr_html, 'utf8');
Original prompt

This section details on the original issue you should resolve

<issue_title>add ssr previews</issue_title>
<issue_description>Add lui-ssr:latest to dev dependencies.
In build.js, after generating the app-en.js, run it through lui-ssr and store the result in app-en-ssr.html.
app-en is a placeholder, it should be done for all languages.
Make sure these html files are also committed to the dist branch by the build github action.
Note that these html files should only include the string returned by lui-ssr and nothing else.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 4, 2026 11:16
Co-authored-by: L3P3 <4629449+L3P3@users.noreply.github.com>
Co-authored-by: L3P3 <4629449+L3P3@users.noreply.github.com>
Copilot AI changed the title [WIP] Add SSR previews for multiple languages Add SSR preview generation for all languages Feb 4, 2026
Copilot AI requested a review from L3P3 February 4, 2026 11:19
@L3P3 L3P3 marked this pull request as ready for review February 4, 2026 11:27
Copilot AI review requested due to automatic review settings February 4, 2026 11:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds server-side rendering (SSR) preview generation for all supported languages using the lui-ssr package. The implementation generates static HTML files for each language build, which enables better SEO and provides static previews of the initial app state.

Changes:

  • Added lui-ssr:latest to devDependencies for SSR functionality
  • Extended the build_js() function to generate SSR HTML files after compiling each language's JavaScript bundle
  • Implemented error handling with language-specific context for debugging SSR failures

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
package.json Adds lui-ssr package dependency for SSR generation
build.js Implements SSR HTML generation for all 5 languages (de, en, ru, tr, uk) with error handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread build.js Outdated
Comment thread package.json Outdated
@L3P3 L3P3 merged commit 8c7a591 into master Feb 4, 2026
2 checks passed
@L3P3 L3P3 deleted the copilot/add-ssr-previews branch February 4, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add ssr previews

3 participants