pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/docsifyjs/docsify-cli/pull/104.patch

false, + desc: chalk.gray(y18n.__('init.coverpage')), + nargs: 0, + requiresArg: false, + type: 'boolean' } }), - handler: argv => run.init(argv.path, argv.local, argv.theme, argv.sidebar, argv.navbar) + handler: argv => run.init(argv.path, argv.local, argv.theme, argv.sidebar, argv.navbar, argv.coverpage) }) .command({ command: 'serve [path]', diff --git a/lib/commands/init.js b/lib/commands/init.js index 0274dcd..26ce33c 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -10,7 +10,7 @@ const replace = function (file, tpl, replace) { } // eslint-disable-next-line -module.exports = function (path = '', local, theme, sidebar, navbar) { +module.exports = function (path = '', local, theme, sidebar, navbar, coverpage) { const msg = '\n' + chalk.green('Initialization succeeded!') + @@ -54,6 +54,11 @@ module.exports = function (path = '', local, theme, sidebar, navbar) { replace(target(filename), 'window.$docsify = {', 'window.$docsify = {\n loadNavbar: true,') } + if (coverpage) { + cp(pwd('template/_coverpage.md'), target('_coverpage.md')) + replace(target(filename), 'window.$docsify = {', 'window.$docsify = {\n coverpage: true,') + } + if (pkg.name) { replace( target(filename), diff --git a/lib/template/_coverpage.md b/lib/template/_coverpage.md new file mode 100644 index 0000000..6716b22 --- /dev/null +++ b/lib/template/_coverpage.md @@ -0,0 +1,14 @@ + + +![logo](_media/icon.svg) + +# docsify 3.5 + +> A magical documentation site generator. + +- Simple and lightweight (~21kB gzipped) +- No statically built html files +- Multiple themes + +[GitHub](https://github.com/docsifyjs/docsify/) +[Get Started](#docsify) From 691b690fcbd304251b49463b00da1cf91a9e6d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wesley=20Gon=C3=A7alves?= Date: Sun, 26 Apr 2020 19:21:38 -0300 Subject: [PATCH 6/9] docs: add init coverpage option --- docs/README.md | 9 +++++++-- tools/locales/en.json | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index 6d4feed..1b1352b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -35,9 +35,9 @@ npm i docsify-cli -g Use `init` to generate your docs. ```shell -docsify init [--local false] [--theme vue] [--sidebar false] [--navbar false] +docsify init [--local false] [--theme vue] [--sidebar false] [--navbar false] [--coverpage false] -# docsify i [--local false] [--theme vue] [--sidebar false] [--navbar false] +# docsify i [--local false] [--theme vue] [--sidebar false] [--navbar false] [--coverpage false] ``` `` defaults to the current directory. Use relative paths like `./docs` (or `docs`). @@ -62,6 +62,11 @@ docsify init [--local false] [--theme vue] [--sidebar false] [--navbar fa * Type: boolean * Default: `false` * Description: Include navbar when generating a new doc, defaults to `false`. +* `--coverpage` option: + * Shorthand: `-c` + * Type: boolean + * Default: `false` + * Description: Include coverpage when generating a new doc, defaults to `false`. ### `serve` command diff --git a/tools/locales/en.json b/tools/locales/en.json index 656c7e8..dddedc0 100644 --- a/tools/locales/en.json +++ b/tools/locales/en.json @@ -8,6 +8,7 @@ "init.theme": "Theme file to be used.", "init.sidebar": "Include sidebar when generating a new doc, defaults to `false`.", "init.navbar": "Include navbar when generating a new doc, defaults to `false`.", + "init.coverpage": "Include coverpage when generating a new doc, defaults to `false`.", "serve": "Run local server to preview site.", "serve.open": "Open docs in default browser. To explicitly set --open to false you may use --no-open.", "serve.port": "Listen port.", From cbb24ac1e5ce4f149670ec0182b0ec10ab0f2002 Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Fri, 30 Oct 2020 17:00:20 +0800 Subject: [PATCH 7/9] Update --- .gitignore | 1 + README.md | 25 ++++++++++++++++++++----- docs/README.md | 8 ++++---- lib/template/_coverpage.md | 10 ++++------ lib/template/_navbar.md | 6 ++---- lib/template/_sidebar.md | 5 ++--- tools/locales/zh.json | 7 +++++-- 7 files changed, 38 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 6746c28..083cacc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules/ yarn.lock bin/ +.idea diff --git a/README.md b/README.md index 7622c5b..946a367 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- docsify + docsify

@@ -30,7 +30,7 @@ ## Screencast -![Screencast](https://raw.githubusercontent.com/QingWei-Li/docsify-cli/master/media/screencast.gif) +![Screencast](https://raw.githubusercontent.com/docsifyjs/docsify-cli/master/media/screencast.gif) > Running a server on `localhost` with live-reload. @@ -50,9 +50,9 @@ npm i docsify-cli -g Use `init` to generate your docs. ```shell -docsify init [--local false] [--theme vue] +docsify init [--local false] [--theme vue] [--sidebar false] [--navbar false] [--coverpage false] -# docsify i [--local false] [--theme vue] +# docsify i [--local false] [--theme vue] [--sidebar false] [--navbar false] [--coverpage false] ``` `` defaults to the current directory. Use relative paths like `./docs` (or `docs`). @@ -61,12 +61,27 @@ docsify init [--local false] [--theme vue] - Shorthand: `-l` - Type: boolean - Default: `false` - - Description: Copy `docsify` files to the docs path, defaults to `false` using `unpkg.com` as the content delivery network (CDN). To explicitly set this option to `false` use `--no-local`. + - Description: Copy `docsify` files to the docs path, defaults to `false` using `jsDelivr` as the content delivery network (CDN). To explicitly set this option to `false` use `--no-local`. - `--theme` option: - Shorthand: `-t` - Type: string - Default: `vue` - Description: Choose a theme, defaults to `vue`, other choices are `buble`, `dark` and `pure`. +- `--sidebar` option: + * Shorthand: `-s` + * Type: boolean + * Default: `false` + * Description: Include sidebar when generating a new doc, defaults to `false`. +- `--navbar` option: + * Shorthand: `-n` + * Type: boolean + * Default: `false` + * Description: Include navbar when generating a new doc, defaults to `false`. +- `--coverpage` option: + * Shorthand: `-c` + * Type: boolean + * Default: `false` + * Description: Include coverpage when generating a new doc, defaults to `false`. ### `serve` command diff --git a/docs/README.md b/docs/README.md index 1b1352b..e5f7666 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # docsify-cli -[![Build Status master branch](https://img.shields.io/travis/QingWei-Li/docsify-cli/master.svg?style=flat-square)](https://travis-ci.org/QingWei-Li/docsify-cli) +[![Build Status master branch](https://img.shields.io/travis/docsifyjs/docsify-cli/master.svg?style=flat-square)](https://travis-ci.org/docsifyjs/docsify-cli) [![License](https://img.shields.io/github/license/QingWei-Li/docsify-cli.svg?style=flat-square)](https://github.com/QingWei-Li/docsify-cli/blob/master/LICENSE) [![Github tag](https://img.shields.io/github/tag/QingWei-Li/docsify-cli.svg?style=flat-square)](https://github.com/QingWei-Li/docsify-cli/tags) [![npm version](https://img.shields.io/npm/v/docsify-cli.svg?style=flat-square)](https://www.npmjs.com/package/docsify-cli) @@ -11,11 +11,11 @@ ## Links -* [docsify](https://github.com/QingWei-Li/docsify) +* [docsify](https://github.com/docsifyjs/docsify) ## Screencast -![Screencast](https://raw.githubusercontent.com/QingWei-Li/docsify-cli/master/media/screencast.gif) +![Screencast](https://raw.githubusercontent.com/docsifyjs/docsify-cli/master/media/screencast.gif) > Running a server on `localhost` with live-reload. @@ -46,7 +46,7 @@ docsify init [--local false] [--theme vue] [--sidebar false] [--navbar fa * Shorthand: `-l` * Type: boolean * Default: `false` - * Description: Copy `docsify` files to the docs path, defaults to `false` using `unpkg.com` as the content delivery network (CDN). To explicitly set this option to `false` use `--no-local`. + * Description: Copy `docsify` files to the docs path, defaults to `false` using `jsDelivr` as the content delivery network (CDN). To explicitly set this option to `false` use `--no-local`. * `--theme` option: * Shorthand: `-t` * Type: string diff --git a/lib/template/_coverpage.md b/lib/template/_coverpage.md index 6716b22..66c2760 100644 --- a/lib/template/_coverpage.md +++ b/lib/template/_coverpage.md @@ -1,14 +1,12 @@ - +![logo](https://cdn.jsdelivr.net/gh/docsifyjs/docsify/docs/_media/icon.svg) -![logo](_media/icon.svg) - -# docsify 3.5 +# docsify > A magical documentation site generator. -- Simple and lightweight (~21kB gzipped) +- Simple and lightweight - No statically built html files - Multiple themes [GitHub](https://github.com/docsifyjs/docsify/) -[Get Started](#docsify) +[Getting Started](#docsify) diff --git a/lib/template/_navbar.md b/lib/template/_navbar.md index c2d07c0..8f2b03e 100644 --- a/lib/template/_navbar.md +++ b/lib/template/_navbar.md @@ -1,4 +1,2 @@ - - -* [En](/) -* [chinese](/zh-cn/) +- Translations + - [:uk: English](/) diff --git a/lib/template/_sidebar.md b/lib/template/_sidebar.md index 8524dd1..c3e92ee 100644 --- a/lib/template/_sidebar.md +++ b/lib/template/_sidebar.md @@ -1,4 +1,3 @@ - +- Getting started -* [Home](/) -* [Guide](guide.md) + - [Home](/) diff --git a/tools/locales/zh.json b/tools/locales/zh.json index 58a2e68..f88fd80 100644 --- a/tools/locales/zh.json +++ b/tools/locales/zh.json @@ -2,14 +2,17 @@ "epilog": "文档地址:\n https://docsifyjs.github.io/docsify\n https://docsifyjs.github.io/docsify-cli\n\n开发:\n https://github.com/docsifyjs/docsify-cli/blob/master/CONTRIBUTING.md\n", "group.globaloptions": "全局选项", "help": "帮助", - "start": "Server for SSR", "init": "创建 docs", + "start": "Server for SSR", "init.local": "拷贝 docsify 到本地", "init.theme": "选择主题", + "init.sidebar": "生成新文档时包含侧边栏,默认为 `false`", + "init.navbar": "生成新文档时包含导航栏,默认为 `false`", + "init.coverpage": "生成新文档时包括封面页,默认为 `false`", "serve": "本地预览", "serve.open": "自动打开浏览器", "serve.port": "设置端口", - "serve.indexname": "Custom filename instead of index.html to serve by default", + "serve.indexname": "自定义首页文件名称", "livereload.port": "设置livereload端口", "usage": "例子", "version": "当前版本号" From ac5e0bb1f7e4a7dd39b3530af8af58f212764c29 Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Fri, 30 Oct 2020 17:13:24 +0800 Subject: [PATCH 8/9] revert --- .gitignore | 1 - README.md | 2 +- docs/README.md | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 083cacc..6746c28 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ node_modules/ yarn.lock bin/ -.idea diff --git a/README.md b/README.md index 946a367..b468e16 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ docsify init [--local false] [--theme vue] [--sidebar false] [--navbar fa - Shorthand: `-l` - Type: boolean - Default: `false` - - Description: Copy `docsify` files to the docs path, defaults to `false` using `jsDelivr` as the content delivery network (CDN). To explicitly set this option to `false` use `--no-local`. + - Description: Copy `docsify` files to the docs path, defaults to `false` using `unpkg.com` as the content delivery network (CDN). To explicitly set this option to `false` use `--no-local`. - `--theme` option: - Shorthand: `-t` - Type: string diff --git a/docs/README.md b/docs/README.md index e5f7666..60e345c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # docsify-cli -[![Build Status master branch](https://img.shields.io/travis/docsifyjs/docsify-cli/master.svg?style=flat-square)](https://travis-ci.org/docsifyjs/docsify-cli) +[![Build Status master branch](https://img.shields.io/travis/QingWei-Li/docsify-cli/master.svg?style=flat-square)](https://travis-ci.org/docsifyjs/docsify-cli) [![License](https://img.shields.io/github/license/QingWei-Li/docsify-cli.svg?style=flat-square)](https://github.com/QingWei-Li/docsify-cli/blob/master/LICENSE) [![Github tag](https://img.shields.io/github/tag/QingWei-Li/docsify-cli.svg?style=flat-square)](https://github.com/QingWei-Li/docsify-cli/tags) [![npm version](https://img.shields.io/npm/v/docsify-cli.svg?style=flat-square)](https://www.npmjs.com/package/docsify-cli) From 514515391f009f35e480b10ad2c04dce0b78050b Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Fri, 30 Oct 2020 17:18:50 +0800 Subject: [PATCH 9/9] revert --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 60e345c..4ab2432 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # docsify-cli -[![Build Status master branch](https://img.shields.io/travis/QingWei-Li/docsify-cli/master.svg?style=flat-square)](https://travis-ci.org/docsifyjs/docsify-cli) +[![Build Status master branch](https://img.shields.io/travis/QingWei-Li/docsify-cli/master.svg?style=flat-square)](https://travis-ci.org/QingWei-Li/docsify-cli) [![License](https://img.shields.io/github/license/QingWei-Li/docsify-cli.svg?style=flat-square)](https://github.com/QingWei-Li/docsify-cli/blob/master/LICENSE) [![Github tag](https://img.shields.io/github/tag/QingWei-Li/docsify-cli.svg?style=flat-square)](https://github.com/QingWei-Li/docsify-cli/tags) [![npm version](https://img.shields.io/npm/v/docsify-cli.svg?style=flat-square)](https://www.npmjs.com/package/docsify-cli) pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy