diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 051514b..c8ab579 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -23,6 +23,7 @@ - [Offline Mode(PWA)](pwa.md) - [Server-Side Rendering(SSR)](ssr.md) - [Embed Files](embed-files.md) + - [Generate static html](static.md) - [Awesome docsify](awesome.md) - [Changelog](changelog.md) diff --git a/docs/static.md b/docs/static.md new file mode 100644 index 0000000..1d4c7db --- /dev/null +++ b/docs/static.md @@ -0,0 +1,50 @@ +# Generate static html + +_Experimental feature_ + +Generating static html files is good for SEO and speeds up the first rendering. + +But this is not an advantage of docsify. If you only need powerful static documentation, choose another documentation tool like Gitbook or Vuepress. + +## Configuration + +You can configure it in a special config file. + +_config.js_ + +```js +module.exports = { + template: ` + + + + My Doc + + + + + + + + + +`, // or html file path + + config: { + // docsify config + coverpage: true + } +}; +``` + +## Generate + +Please use docsify-cli 5.0+ and run this command. + +```sh +docsify static docs -c config.js +``` + +## Simple Demo + +This is an example showing the docsify official documentation generating static files. [docsify-static-demo](https://github.com/docsifyjs/docsify-static-demo)