GithubHelp home page GithubHelp logo

purple-force / docsite Goto Github PK

View Code? Open in Web Editor NEW
1.5K 46.0 234.0 1.89 MB

An opensource static website generator

Home Page: https://docsite.js.org

License: MIT License

JavaScript 55.80% EJS 0.82% SCSS 43.38%

docsite's Introduction

LOGO

NPM version build status Test coverage David deps Known Vulnerabilities npm download Backers on Open Collective Sponsors on Open Collective

Docsite

Docsite is an opensource generator for building an static website, and you can init a website in a few minutes by it.

Feature

  • Be able to generate document, blog, and custom page
  • Support markdown files
  • Responsive UI
  • Good for SEO
  • Support internationalization
  • Support custom page

Document

User

Dubbo

Nacos

AiMatrix

WHARFOO

Alibaba Infra

Sentinel

Dragonfly

TX-LCN

SEATA

WUHAN2020

ApiBoot

Dependency

  • node.js > 6.x

Usage

  • Install
$ npm i -g docsite
  • Init a project
$ cd my-project
$ docsite init

# or
$ docsite init my-project
  • Local preview
$ docsite start
  • Build
$ docsite build

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

docsite's People

Contributors

hengboy avatar k-water avatar lovepoem avatar monkeywithacupcake avatar purple-force avatar shipengqi avatar x-cold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docsite's Issues

mac run docsite start fail

我在mac 上运行 docsite start 时一直报错:

AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask]

image

package.json
{ "name": "site", "version": "0.0.1", "private": true, "scripts": { "start": "docsite start", "build": "docsite build" }, "devDependencies": { "babel-core": "6.23.1", "babel-eslint": "^6.0.5", "babel-loader": "6.4.0", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-object-assign": "^6.22.0", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-es2015": "6.22.0", "babel-preset-react": "6.23.0", "babel-preset-stage-0": "6.22.0", "babel-register": "^6.26.0", "css-loader": "0.6.12", "docsite": "^1.1.0", "eslint": "^3.6.0", "eslint-config-ali": "^1.0.0", "eslint-plugin-import": "*", "eslint-plugin-react": "*", "extract-text-webpack-plugin": "^2.1.2", "gulp": "^4.0.2", "gulp-util": "2.2.20", "json-loader": "*", "node-libs-browser": "2.0.0", "node-sass": "^4.7.2", "opn": "^5.3.0", "raw-loader": "^0.5.1", "react": "^16.5.2", "react-dom": "^16.5.2", "sass-loader": "6.0.2", "style-loader": "0.6.5", "webpack": "^2.6.1", "webpack-dev-server": "^2.4.5" }, "dependencies": { "classnames": "^2.2.5", "core-decorators": "^0.20.0", "js-cookie": "^2.2.0", "react-scroll": "^1.7.9", "react-tilt": "^0.1.4", "whatwg-fetch": "^2.0.4" } }
.babelrc

image

webpack.config.js
`
const path = require('path');
const fs = require('fs');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

const entry = {};
const targetPath = path.join(__dirname, './src/pages');
fs.readdirSync(targetPath).forEach(page => {
if (
fs.statSync(path.join(targetPath, page)).isDirectory() &&
fs.existsSync(path.join(targetPath, page, 'index.jsx'))
) {
entry[page] = path.join(targetPath, page, 'index.jsx');
}
});
module.exports = {
entry,
output: {
path: path.join(__dirname, 'build'),
filename: '[name].js',
},
externals: {
react: 'React',
'react-dom': 'ReactDOM',
},
module: {
loaders: [
{
test: /.js|jsx$/,
exclude: [/node_modules/, /build/lib/, /.min.js$/],
use: 'babel-loader',
},
{
test: /.(s)?css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'sass-loader'],
}),
},
{
test: /.json?$/,
exclude: /node_modules/,
use: 'json-loader',
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.json'],
},
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new ExtractTextPlugin('[name].css'),
],
};
`

docsite start fail

docsite start
(node:20730) UnhandledPromiseRejectionWarning: Error: Missing binding /usr/local/lib/node_modules/docsite/node_modules/node-sass/vendor/darwin-x64-57/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 8.x

Found bindings for the following environments:
  - OS X 64-bit with Node.js 8.x

my node version:

lanrendeMacBook-Pro:nacos-group.github.io lanren$ node -v
v8.11.1

os:mac

any help? please!

error throwing when install docsite with node v11.1.0 and npm v6.4.1 on mac(10.13.6)

Description

commands I executed on mac

brew install npm [success]
npm install docsite -g

following is the running debug log show the error:

1616 verbose Darwin 17.7.0
1617 verbose argv "/usr/local/Cellar/node/11.1.0/bin/node" "/usr/local/bin/npm" "install" "docsite" "-g"
1618 verbose node v11.1.0
1619 verbose npm  v6.4.1
1620 error code ETARGET
1621 error notarget No matching version found for scheduler@^16.6.2
1622 error notarget In most cases you or one of your dependencies are requesting
1622 error notarget a package version that doesn't exist.
1622 error notarget
1622 error notarget It was specified as a dependency of 'react'
1623 verbose exit [ 1, true ]

建议增加在线编辑或者导入功能

毕竟创建的是静态用户手册,那么可以让用户不需要去执行NMP等命令,那么可以在线提供脚手架的功能,比如我把github上的md导入,马上可以到处一个压缩包,里面是格式良好的docsite的文件

docsite start 报错

(node:98138) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/usr/local/lib/node_modules/docsite/node_modules/node-sass/vendor'
at Object.readdirSync (fs.js:790:3)
at Object.getInstalledBinaries (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/extensions.js:131:13)
at foundBinariesList (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/binding.js:15:30)
at Object. (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/docsite/node_modules/babel-register/lib/node.js:152:7)
(node:98138) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:98138) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
192:see-team.website ying$ docsite start
(node:98408) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/usr/local/lib/node_modules/docsite/node_modules/node-sass/vendor'
at Object.readdirSync (fs.js:790:3)
at Object.getInstalledBinaries (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/extensions.js:131:13)
at foundBinariesList (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:15:5)
192:see-team.website ying$ docsite start
(node:98445) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/usr/local/lib/node_modules/docsite/node_modules/node-sass/vendor'
at Object.readdirSync (fs.js:790:3)
at Object.getInstalledBinaries (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/extensions.js:131:13)
at foundBinariesList (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/binding.js:15:30)
at Object. (/usr/local/lib/node_modules/docsite/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/docsite/node_modules/babel-register/lib/node.js:152:7)
(node:98445) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:98445) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

发布站点docsite到github,操作「Docsite build 」生成哪些文件要放置在github?

发布站点docsite到github,操作「Docsite build 」生成哪些文件要放置在github?

“官方文档:「服务器托管」
将项目中的build目录、img目录、zh-cn目录、en-us目录、index.html及其他图片资源放置在服务器中即可。”

我就是这样做的把「build目录、img目录、zh-cn目录、en-us目录、index.html」部署到了github上有问题,我的项目:https://jingmi-vip.github.io/doc_test/

运行docsite start报错

报错的信息:
[23:48:21] Using gulpfile /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/bin/gulpfile.js
[23:48:21] Starting 'webpack-dev-server'...
[23:48:22] Finished 'webpack-dev-server' after 90 ms
[23:48:22] Starting 'default'...
[23:48:22] Finished 'default' after 31 μs
[23:48:22] [webpack-dev-server] http://127.0.0.1:8080/webpack-dev-server/index.html
Hash: 3a210c0dc1eb165401fb
Version: webpack 2.7.0
Time: 152ms
Asset Size Chunks Chunk Names
home.js 6.64 kB 0 home
documentation.js 6.61 kB 1 documentation
community.js 6.6 kB 2 community
blogDetail.js 6.61 kB 3 blogDetail
blog.js 6.56 kB 4 blog
chunk {0} home.js (home) 443 bytes [entry] [rendered]
[4] ./src/pages/home/index.jsx 443 bytes {0} [built] [failed] [1 error]
chunk {1} documentation.js (documentation) 398 bytes [entry] [rendered]
[3] ./src/pages/documentation/index.jsx 398 bytes {1} [built] [failed] [1 error]
chunk {2} community.js (community) 386 bytes [entry] [rendered]
[2] ./src/pages/community/index.jsx 386 bytes {2} [built] [failed] [1 error]
chunk {3} blogDetail.js (blogDetail) 389 bytes [entry] [rendered]
[1] ./src/pages/blogDetail/index.jsx 389 bytes {3} [built] [failed] [1 error]
chunk {4} blog.js (blog) 357 bytes [entry] [rendered]
[0] ./src/pages/blog/index.jsx 357 bytes {4} [built] [failed] [1 error]

ERROR in ./src/pages/blog/index.jsx
Module parse failed: /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/bin/src/pages/blog/index.jsx Unexpected token (20:6)
You may need an appropriate loader to handle this file type.
| const blogs = dataSource.list;
| return (
|


| <Header
| type="normal"

ERROR in ./src/pages/blogDetail/index.jsx
Module parse failed: /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/bin/src/pages/blogDetail/index.jsx Unexpected token (88:6)
You may need an appropriate loader to handle this file type.
| const __html = this.props.__html || this.state.__html;
| return (
|


| <Header
| type="normal"

ERROR in ./src/pages/community/index.jsx
Module parse failed: /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/bin/src/pages/community/index.jsx Unexpected token (22:6)
You may need an appropriate loader to handle this file type.
| const dataSource = communityConfig[language];
| return (
|


| <Header
| currentKey="community"

ERROR in ./src/pages/documentation/index.jsx
Module parse failed: /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/bin/src/pages/documentation/index.jsx Unexpected token (94:6)
You may need an appropriate loader to handle this file type.
| const __html = this.props.__html || this.state.__html;
| return (
|


| <Header
| currentKey="docs"

ERROR in ./src/pages/home/index.jsx
Module parse failed: /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/bin/src/pages/home/index.jsx Unexpected token (42:6)
You may need an appropriate loader to handle this file type.
| const headerLogo = headerType === 'primary' ? "/img/dubbo_white.png" : "/img/dubbo_colorful.png";
| return (
|


|

| <Header
webpack: Failed to compile.

安装报错-- docsite -v zsh: command not found: docsite

安装过程:
➜ Cellar npm install docsite -g
npm WARN deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
/usr/local/Cellar/node/10.11.0/bin/docsite -> /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/bin/docsite.js

[email protected] install /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/node_modules/fsevents
node install

[fsevents] Success: "/usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

[email protected] install /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/node_modules/node-sass
node scripts/install.js

Cached binary found at /Users/liliang11/.npm/node-sass/4.9.3/darwin-x64-64_binding.node

[email protected] postinstall /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/node_modules/node-sass
node scripts/build.js

Binary found at /usr/local/Cellar/node/10.11.0/lib/node_modules/docsite/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine

  • [email protected]
    added 610 packages from 689 contributors in 80.694s
    ============================================
    本机的一些信息:
    操作系统:Mac OS 10.14
    node.js的版本信息:
    ➜ Cellar npm -v
    6.4.1
    ➜ Cellar node -v
    v10.11.0

[疑问] build 命令是否支持生成到目录

你好,

关于Docsite的使用,在运行
docsite build 之后会生成文件在当前目录,生成文件和源文件混杂在一起,不是很好管理和部署。

想询问一下是否支持将文件生成到一个指定目录(也许可以指定目录),然后直接部署那个目录内所有文件就行了。

比如hugo是生成到public目录 (https://gohugo.io/getting-started/usage/)

win10运行 npm i -g docsite报错

0 info it worked if it ends with ok
1 verbose cli [ 'G:\nodejs\node.exe',
1 verbose cli 'G:\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'docsite',
1 verbose cli '-g' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session f9f46834fc9c40fe
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/docsite 2930ms
8 silly pacote tag manifest for docsite@latest fetched in 2952ms
9 timing stage:loadCurrentTree Completed in 3124ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 0ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule [email protected] checking installable status
17 http fetch GET 200 https://registry.npmjs.org/babel-plugin-transform-decorators-legacy 420ms
18 silly pacote range manifest for babel-plugin-transform-decorators-legacy@^1.3.4 fetched in 425ms
19 silly resolveWithNewModule [email protected] checking installable status
20 http fetch GET 200 https://registry.npmjs.org/babel-preset-stage-0 782ms
21 http fetch GET 200 https://registry.npmjs.org/babel-plugin-transform-object-rest-spread 885ms
22 http fetch GET 200 https://registry.npmjs.org/asset-require-hook 941ms
23 silly pacote range manifest for asset-require-hook@^1.2.0 fetched in 948ms
24 silly resolveWithNewModule [email protected] checking installable status
25 http fetch GET 200 https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz 122ms
26 silly pacote range manifest for babel-plugin-transform-object-rest-spread@^6.23.0 fetched in 1012ms
27 silly resolveWithNewModule [email protected] checking installable status
28 http fetch GET 200 https://registry.npmjs.org/babel-preset-react 1401ms
29 http fetch GET 200 https://registry.npmjs.org/chalk 586ms
30 silly pacote range manifest for chalk@^2.4.1 fetched in 591ms
31 silly resolveWithNewModule [email protected] checking installable status
32 http fetch GET 200 https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz 250ms
33 silly pacote range manifest for babel-preset-react@^6.24.1 fetched in 1655ms
34 silly resolveWithNewModule [email protected] checking installable status
35 http fetch GET 200 https://registry.npmjs.org/babel-register 1373ms
36 http fetch GET 200 https://registry.npmjs.org/babel-plugin-transform-class-properties 1806ms
37 http fetch GET 200 https://registry.npmjs.org/chokidar 862ms
38 silly pacote range manifest for chokidar@^2.0.3 fetched in 869ms
39 silly resolveWithNewModule [email protected] checking installable status
40 http fetch GET 200 https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz 115ms
41 silly pacote range manifest for babel-plugin-transform-class-properties@^6.24.1 fetched in 1926ms
42 silly resolveWithNewModule [email protected] checking installable status
43 http fetch GET 200 https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz 182ms
44 silly pacote range manifest for babel-register@^6.26.0 fetched in 1560ms
45 silly resolveWithNewModule [email protected] checking installable status
46 http fetch GET 200 https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.22.0.tgz 1321ms
47 silly pacote version manifest for [email protected] fetched in 2109ms
48 silly resolveWithNewModule [email protected] checking installable status
49 http fetch GET 200 https://registry.npmjs.org/co 787ms
50 silly pacote range manifest for co@^4.6.0 fetched in 793ms
51 silly resolveWithNewModule [email protected] checking installable status
52 http fetch GET 200 https://registry.npmjs.org/ejs 617ms
53 silly pacote range manifest for ejs@^2.6.1 fetched in 622ms
54 silly resolveWithNewModule [email protected] checking installable status
55 http fetch GET 200 https://registry.npmjs.org/fs-extra 846ms
56 silly pacote range manifest for fs-extra@^6.0.1 fetched in 853ms
57 silly resolveWithNewModule [email protected] checking installable status
58 http fetch GET 200 https://registry.npmjs.org/commander 1409ms
59 silly pacote range manifest for commander@^2.15.1 fetched in 1414ms
60 silly resolveWithNewModule [email protected] checking installable status
61 http fetch GET 200 https://registry.npmjs.org/js-yaml 630ms
62 silly pacote range manifest for js-yaml@^3.12.0 fetched in 637ms
63 silly resolveWithNewModule [email protected] checking installable status
64 http fetch GET 200 https://registry.npmjs.org/css-modules-require-hook 1487ms
65 silly pacote range manifest for css-modules-require-hook@^4.2.3 fetched in 1492ms
66 silly resolveWithNewModule [email protected] checking installable status
67 http fetch GET 200 https://registry.npmjs.org/highlight.js 1344ms
68 silly pacote range manifest for highlight.js@^9.12.0 fetched in 1351ms
69 silly resolveWithNewModule [email protected] checking installable status
70 http fetch GET 200 https://registry.npmjs.org/babel-plugin-transform-runtime 3620ms
71 http fetch GET 200 https://registry.npmjs.org/markdown-it 580ms
72 silly pacote range manifest for markdown-it@^8.4.1 fetched in 584ms
73 silly resolveWithNewModule [email protected] checking installable status
74 http fetch GET 200 https://registry.npmjs.org/markdown-it-footnote 834ms
75 silly pacote range manifest for markdown-it-footnote@^3.0.1 fetched in 841ms
76 silly resolveWithNewModule [email protected] checking installable status
77 http fetch GET 200 https://registry.npmjs.org/babel-plugin-transform-object-assign 4156ms
78 http fetch GET 200 https://registry.npmjs.org/markdown-it-github-preamble 862ms
79 silly pacote range manifest for markdown-it-github-preamble@^1.0.0 fetched in 866ms
80 silly resolveWithNewModule [email protected] checking installable status
81 http fetch GET 200 https://registry.npmjs.org/markdown-it-link-attributes 902ms
82 silly pacote range manifest for markdown-it-link-attributes@^2.0.0 fetched in 907ms
83 silly resolveWithNewModule [email protected] checking installable status
84 http fetch GET 200 https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz 1368ms
85 silly pacote range manifest for babel-plugin-transform-runtime@^6.23.0 fetched in 4993ms
86 silly resolveWithNewModule [email protected] checking installable status
87 http fetch GET 200 https://registry.npmjs.org/opencollective 172ms
88 silly pacote range manifest for opencollective@^1.0.3 fetched in 176ms
89 silly resolveWithNewModule [email protected] checking installable status
90 http fetch GET 200 https://registry.npmjs.org/inquirer 3023ms
91 silly pacote range manifest for inquirer@^6.2.1 fetched in 3028ms
92 silly resolveWithNewModule [email protected] checking installable status
93 http fetch GET 200 https://registry.npmjs.org/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz 1343ms
94 silly pacote range manifest for babel-plugin-transform-object-assign@^6.22.0 fetched in 5504ms
95 silly resolveWithNewModule [email protected] checking installable status
96 http fetch GET 200 https://registry.npmjs.org/markdown-it-katex 1932ms
97 silly pacote range manifest for markdown-it-katex@^2.0.3 fetched in 1937ms
98 silly resolveWithNewModule [email protected] checking installable status
99 http fetch GET 200 https://registry.npmjs.org/babel-polyfill 5609ms
100 http fetch GET 200 https://registry.npmjs.org/shelljs 336ms
101 silly pacote range manifest for shelljs@^0.8.2 fetched in 342ms
102 silly resolveWithNewModule [email protected] checking installable status
103 http fetch GET 200 https://registry.npmjs.org/react-dom 971ms
104 silly pacote range manifest for react-dom@^16.5.2 fetched in 977ms
105 silly resolveWithNewModule [email protected] checking installable status
106 http fetch GET 200 https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz 1716ms
107 silly pacote range manifest for babel-polyfill@^6.26.0 fetched in 7330ms
108 silly resolveWithNewModule [email protected] checking installable status
109 http fetch GET 200 https://registry.npmjs.org/opencollective-postinstall 2763ms
110 silly pacote range manifest for opencollective-postinstall@^2.0.1 fetched in 2767ms
111 silly resolveWithNewModule [email protected] checking installable status
112 http fetch GET 200 https://registry.npmjs.org/babel-preset-es2015 9243ms
113 http fetch GET 200 https://registry.npmjs.org/jsdom 6714ms
114 silly pacote range manifest for jsdom@^11.12.0 fetched in 6725ms
115 silly resolveWithNewModule [email protected] checking installable status
116 http fetch GET 200 https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.22.0.tgz 645ms
117 silly pacote version manifest for [email protected] fetched in 9894ms
118 warn deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
119 silly resolveWithNewModule [email protected] checking installable status
120 http fetch GET 200 https://registry.npmjs.org/markdown-it-replace-link 6023ms
121 silly pacote range manifest for markdown-it-replace-link@^1.0.1 fetched in 6027ms
122 silly resolveWithNewModule [email protected] checking installable status
123 http fetch GET 200 https://registry.npmjs.org/react 4940ms
124 silly pacote range manifest for react@^16.5.2 fetched in 4947ms
125 silly resolveWithNewModule [email protected] checking installable status
126 http fetch GET 200 https://registry.npmjs.org/markdown-it-github-toc 9904ms
127 silly pacote range manifest for markdown-it-github-toc@^3.2.4 fetched in 9909ms
128 silly resolveWithNewModule [email protected] checking installable status
129 http fetch GET 200 https://registry.npmjs.org/node-sass 18960ms
130 silly fetchPackageMetaData error for node-sass@^4.9.2 Unexpected end of JSON input while parsing near '...odash.assign":"^4.2.0'
131 timing stage:rollbackFailedOptional Completed in 0ms
132 timing stage:runTopLevelLifecycles Completed in 27043ms
133 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...odash.assign":"^4.2.0'
133 verbose stack at JSON.parse ()
133 verbose stack at parseJson (G:\nodejs\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
133 verbose stack at consumeBody.call.then.buffer (G:\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
133 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
134 verbose cwd C:\Users\Administrator
135 verbose Windows_NT 10.0.14393
136 verbose argv "G:\nodejs\node.exe" "G:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "docsite" "-g"
137 verbose node v10.15.3
138 verbose npm v6.4.1
139 error Unexpected end of JSON input while parsing near '...odash.assign":"^4.2.0'
140 verbose exit [ 1, true ]

mac s上 docsite start 报错

报错 stack trace:
`const { Math, Object } = primordials;
^

ReferenceError: primordials is not defined
at fs.js:27:26
at req_ (/Users/xuezhe.jin/sideProject/daily/daily/node_modules/natives/index.js:143:24)
at Object.req [as require] (/Users/xuezhe.jin/sideProject/daily/daily/node_modules/natives/index.js:55:10)
at Object. (/Users/xuezhe.jin/sideProject/daily/daily/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Object.require.extensions. [as .js] (/Users/xuezhe.jin/sideProject/daily/daily/node_modules/babel-register/lib/node.js:152:7)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
^C`

首页按钮只能2个吗

想首页加三个菜单,立即查看,github,gitee

home.jsx:buttons多加了一个菜单,但是还是显示2个菜单

找到page/home/index.jsx

dataSource.brand.buttons.map(b => {b.text})
{ console.log(dataSource.brand.buttons)}

打印数据是3个
如何才能设置3个菜单?

运行npm i -g docsite时候报错

运行npm i -g docsite时候报错

192:projects wx$ node -v
v8.9.0
192:projects wx$ npm i -g docsite
deprecated [email protected]: ????  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 

dubbo-website项目也是一样的效果

win10 local preview error

environment:
win10
nodev8.9.4

when run command in powershell : docsite start
get this:
'node_modules' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
exec: 'node_modules' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

文档左侧导航栏只支持两级,第三级不显示

如题,对docs.js经行编辑,第三级标题无法显示,是不是因为文档就不应该出现这么层级,所以默认只加载两级目录?

sidemenu: [
            {
                title: '主标题',
                children: [
                    {
                        title: '一级标题',
                        link: '/zh-cn/docs/first/a.html',
                    },
                    {
                        title: '一级标题',
                        opened: true,
                        children: [
                            {
                                title: '二级标题',
                                opened: true,
                                children: [
                                    {
                                        title: '三级标题',
                                        link: '/zh-cn/docs/third/b.html',

需求:添加动态配置的功能

有的文档不需要社区功能,有的不需要博客功能,
希望”首页,社区,博客,文档“等,各个菜单功能可以拆分,需要时根据配置文件分别加入。

另外,动态生成zh-cn,en-us文件夹,并且在该文件夹下生成一堆静态文件的方式太冗余了,
如果要有十几个国家语言的情况呢?建议把国际化拆分出来。

页面内瞄点跳转

查看 NACOS_FAQ 页面,点击链接是可以进行跳转到指定的位置,查看DOM元素,发现有个id,但是markdown语法里面的.是可以忽略的,亦或者是需要自己在md文件手写跳转id ?

   ## <h2 id='2.3'>2.3 bootstrap</h2>

尝试着手写id,但是渲染后的HTML元素多了一个空的h4,并且多了一条横线。

222

查看github上面的语法好像是另外一种写法,例如Apollo配置中心介绍,写法如下(部分):

   * [1、What is Apollo](#1what-is-apollo)
   * [2、Why Apollo](#2why-apollo)
   * [3、Apollo at a glance](#3apollo-at-a-glance)
   * [4、Apollo in depth](#4apollo-in-depth)
   * [5、Contribute to Apollo](#5contribute-to-apollo)

   # 1、What is Apollo

   ## 1.1 背景

   ## 1.2 Apollo简介

   # 2、Why Apollo

想知道nacos 上面的链接是怎么写的?

[需求]能否支持自动生成文章导航,而不需要配置呢?

现在每次增加文章都需要写个markdown, 然后还要配置一下docs.js或者blog.js,有点太痛苦。
我有个建议,如下:
1、docs.js blog.js只配置目录结构,配置目录路径对应的名字,好像只需要这个,也不需要配置层级。
2、markdown编写的,头部包含元信息,order表示顺序,越小越排在前面,title表示导航名字。
3、目录结构靠文件目录结构区分。
这样做的好处是毕竟目录结构调整是低频的,偶尔修改可以接受。对于文章增加,这个是高频的,如果目录不变的话,根本不需要其他操作,我只关心叫啥名,顺序是啥,所以统一放到markdown里比较合适

自定义markdown样式不生效

通过官网文档描述自定义markdown样式内容不生效,我已经复制了对应的css到markdown.scss文件内容,还需要删除之前的部分样式吗?

功能询问:如何增加包含md文件地址的链接

希望在docsite生成的网址上新增一个链接,内容为Edit on github page,链接内容到github对应的md文件。

也就是说不同的页面,能够根据github源md文件地址生成不同的链接。
以Dubbo网址为例,
http://dubbo.incubator.apache.org/en-us/docs/user/preface/background.html 页面上,
这个链接应该指向
https://github.com/apache/incubator-dubbo-website/edit/asf-site/docs/en-us/user/preface/background.md

不知道docsite是否支持此类需求,如果支持具体要怎么修改?

docsite是否支持cnetos7离线安装

离线安装成功之后,但是执行 docsite init 命令的时候还是会访问https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node 这个下载地址,内部服务器无法联网,安装时用nexus的npm仓库安装的。并且我已经全局安装了node-sass。请问安装后 支持离线初始化吗?【adm@C111908191 docsitedemo]$ `docsite init
? Which directory should the project initialized in? .
Project folder was created successfully.
npm WARN deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN tarball tarball data for jsx-ast-utils@^2.1.0 (sha1-TUlz6/i50oN+6RqCCMxm86J3bPs=) seems to be corrupted. Trying one more time.

[email protected] install /data/web/docsitedemo/node_modules/node-sass
node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node":

ETIMEDOUT

Timed out attemping to establish a remote connection`

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.