https://github.com/voronenko/self-hosted-prerender
https://github.com/voronenko/self-hosted-prerender
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/voronenko/self-hosted-prerender
- Owner: Voronenko
- Created: 2021-08-16T09:53:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-17T08:11:37.000Z (over 4 years ago)
- Last Synced: 2025-04-15T01:14:46.823Z (9 months ago)
- Language: Dockerfile
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# self-hosted-prerender
Demo repository illustrating way how dynamic web sites with extensive usage of the javascript
can be indexed by search engines by using helping proxy software, called "prerender".
It can detect search engines by the host header, and serve fully rendered html page instead,
so that search engine could index rendered page contents.
## Usage
Check how prerender image is build from `prerender` folder.
Build the demo container in the root illustrating the process.
Compare output of usual page open
```sh
curl http://prerender.lvh.voronenko.net
document.write('<p>This paragraph was rendered with script</p>');
```
If you are running example without Traefik2 installed in your system, identical
direct call to running container would be
```shell
curl -H "Host: prerender.lvh.voronenko.net:80" http://localhost:5080
```
and moment, when page is get's opened with a bot
```sh
curl -A googlebot http://prerender.lvh.voronenko.net
This paragraph was rendered with script
```
or, without traefik
```shell
curl -A googlebot -H "Host: prerender.lvh.voronenko.net:80" http://localhost:5080
```