Git Product home page Git Product logo

jsrender's Introduction

JSRender

JSRender 是一个基于koa + puppeteer 构建的 SSR 服务端渲染 SEO 工具,可以帮助任何类型的前端渲染页面进行快速服务端渲染,从而实现前端渲染类页面进行SEO优化。

Installation

使用 Docker 部署

使用docker安装部署:

docker run -d -p 8000:8000 -v <config.json路径>:/app/config/config.json registry.cn-shenzhen.aliyuncs.com/shikanon/jsrender

config.json 是配置文件,可以自定义config/config.json

{
    "targetHost": "<需要做SSR的网站>"
}

使用 npm 安装

使用 npm 安装:

git clone https://github.com/shikanon/JSRender.git
cd JSRender
npm install

如果在安装 puppeteer 遇到问题,可以参考puppeteer troubleshooting或者参考这篇博客针对jQuery页面做SSR服务器渲染方案

Document

JSRender 通过劫持流量,对 UA 进行判断 spdier(搜索引擎爬虫)决定是否哪些流量需要 puppeteer 进行渲染,哪些流量直接转发。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.