This package has been deprecated

Author message:

docsify-server-renderer 4.x and below is no longer supported while we investigate the future of SSR and SSG for Docsify

docsify-server-renderer

4.13.1 • Public • Published

docsify-server-renderer

Install

yarn add docsify-server-renderer

Usage

var Renderer = require('docsify-server-renderer')
var readFileSync = require('fs').readFileSync

// init
var renderer = new Renderer({
  template: readFileSync('./docs/index.template.html', 'utf-8'),
  config: {
    name: 'docsify',
    repo: 'docsifyjs/docsify'
  }
})

renderer.renderToString(url)
  .then(html => {})
  .catch(err => {})

index.template.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>docsify</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css" title="vue">
</head>
<body>
  <!--inject-app-->
  <!--inject-config-->
  <script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.js"></script>
</body>
</html>

Readme

Keywords

none

Package Sidebar

Install

npm i docsify-server-renderer

Weekly Downloads

23,614

Version

4.13.1

License

MIT

Unpacked Size

129 kB

Total Files

4

Last publish

Collaborators

  • anixsaha
  • jhildenbiddle
  • koooooo-7
  • qingwei.li
  • sy-records
  • trusktr