Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTML pre-rendering #91

Merged
merged 2 commits into from
May 23, 2023
Merged

Add HTML pre-rendering #91

merged 2 commits into from
May 23, 2023

Conversation

FKolwa
Copy link
Member

@FKolwa FKolwa commented May 23, 2023

Replace dr:surge with react-spa-prerender
Add react-spa config
Add new postbuild step

What hat changed?
To increase SEO performance for our front-end I have added a postbuild step which will generate static pre-rendered HTML files from our static Javascript page.

It will turn this:

  <script defer="defer" src="/main.bundle.js"></script>
  <link href="/main.css" rel="stylesheet">

Into this:

<div id="root">
    <div class="pf-c-page pf-m-resize-observer pf-m-breakpoint-md pf-m-height-breakpoint-2xl"><a
        class="pf-c-button pf-m-primary pf-c-skip-to-content" href="#primary-app-container">Skip to Content</a>
      ...

New Output
Screenshot from 2023-05-23 10-01-17

Closes: #90

FKolwa and others added 2 commits May 23, 2023 10:00
Replace dr:surge with react-spa-prerender
Add react-spa config
Add new postbuild step
@FKolwa FKolwa requested review from major and miyunari May 23, 2023 08:04
Copy link
Member

@major major left a comment

Choose a reason for hiding this comment

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

Nice find!

@major major merged commit 53ac6a8 into main May 23, 2023
2 checks passed
@major major deleted the pre-render-html-content-90 branch May 23, 2023 11:23
@FKolwa FKolwa added v2 Second iteration of the CID front-end SEO Issue related to SEO improvements labels Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SEO Issue related to SEO improvements v2 Second iteration of the CID front-end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-Render into static HTML files
2 participants