This project aimed to help with SEO optimization for those who forget about SSR
- Serve your original SPA content via builtin asp.net core kestrel server
- Prerender your pages in background with puppeteer-sharp and cache them to filesystem or memory
- Serve prerendered content for crawlers and original content for users
- linux or windows host
- (linux only) dependencies for puppeteer
sudo apt-get install libgbm1 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libxkbcommon-x11-0 libxss1 libxshmfence1
- (optional) nginx as kestrel proxy
Download latest release or clone github repository
- unpack downloaded release
- configure server via appsettings.json
- run release on linux via
./spa-prerenderer
or on windowsspa-prerenderer.exe
- (optional) configure nginx proxy
- (optional) install as systemd service
- if you choose to use sources you can run server with
dotnet run
- Project uses puppeteer-sharp licensed under MIT
- Project uses detection licensed under Apache License 2.0