From 67f9083ff731c03c6e027195cc4b2cba09d338e4 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Sat, 24 Dec 2016 19:50:04 +0800 Subject: [PATCH] Remove 404.html --- README.md | 6 ------ docs/README.md | 23 +++++++---------------- docs/zh-cn.md | 26 +++++++++----------------- 3 files changed, 16 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 6b15d72..70c0e1e 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,6 @@ index.html ``` -Or create a `404.html` and `README.md` into `/docs`. Just remove `data-router` - -```html - -``` - ## CDN - UNPKG [https://unpkg.com/docsify/](https://unpkg.com/docsify/) - jsDelivr [http://www.jsdelivr.com/projects/docsify](http://www.jsdelivr.com/projects/docsify) diff --git a/docs/README.md b/docs/README.md index 8dda6ac..2513e46 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,7 +8,7 @@ mkdir docs && cd docs ``` ### Create entry file -Create a `404.html` file +Create a `index.html` file ```html @@ -20,7 +20,7 @@ Create a `404.html` file
- + ``` @@ -77,27 +77,18 @@ Minified files ## More ### Multiple pages -If you need other pages, directly create the markdown file, such as `guide.md` is `/guide`. +If you need other pages, directly create the markdown file, such as `guide.md` is `/#/guide`. ### Navbar -Code in `404.html` +Code in `index.html` ```html ``` -### Hash router -`404.html` is not SEO friendly, you can replace it use `index.html` and `data-router` [issue#7](https://github.com/QingWei-Li/docsify/issues/7) - -index.html - -```html - -``` - ### CDN - UNPKG [https://unpkg.com/docsify/](https://unpkg.com/docsify/) - jsDelivr [http://www.jsdelivr.com/projects/docsify](http://www.jsdelivr.com/projects/docsify) @@ -242,7 +233,7 @@ If you write a sub level list, it will generate a dropdown list. #### router -Hash router. You can replace `404.html` with `index.html`. +Hash router. ```html diff --git a/docs/zh-cn.md b/docs/zh-cn.md index 7897cb1..bf9295d 100644 --- a/docs/zh-cn.md +++ b/docs/zh-cn.md @@ -14,7 +14,7 @@ mkdir docs && cd docs ``` ### 创建入口文件 -创建一个 `404.html` 文件,内容为 +创建一个 `index.html` 文件,内容为 ```html @@ -25,7 +25,7 @@ mkdir docs && cd docs
- + ``` @@ -66,7 +66,7 @@ docsify serve docs 更多选项参考 [docsify-cli](https://github.com/QingWei-Li/docsify-cli) ## 主题 -目前提供 vue.css 和 buble.css,直接修改 `404.html` 里的 cdn 地址即可 +目前提供 vue.css 和 buble.css,直接修改 `index.html` 里的 cdn 地址即可 ```html @@ -82,26 +82,18 @@ docsify serve docs ## 更多功能 ### 多页面 -`README.md` 作为主页面,如果需要其他页面,直接在文档目录下创建对应的 `*.md` 文件,例如创建一个 `guide.md` 那么对应的路由就是 `/guide`。 +`README.md` 作为主页面,如果需要其他页面,直接在文档目录下创建对应的 `*.md` 文件,例如创建一个 `guide.md` 那么对应的路由就是 `/#/guide`。 ### 导航 -导航需要自己写在 `404.html` 文件里,效果参考本文档 +导航需要自己写在 `index.html` 文件里,效果参考本文档 ```html ``` -### Hash router -`404.html` 对 SEO 不友好, 你可以用 `index.html` 代替并开启 `hash router` 功能。 [issue#7](https://github.com/QingWei-Li/docsify/issues/7) - -index.html - -```html - -``` ### CDN @@ -133,7 +125,7 @@ index.html ### 配置参数 #### repo -参考本文档的右上角的 GitHub 图标,如果要开启的话,将 `404.html` 里的 script 改成 +参考本文档的右上角的 GitHub 图标,如果要开启的话,将 `index.html` 里的 script 改成 ```html @@ -246,7 +238,7 @@ Sidebar 开关按钮 #### router -开启 hash router 功能,此时可以创建 `index.html` 作为入口文件,同时多页面切换不会重新加载资源。资源路径会被替换成 `/#/` 的形式。 +开启 hash router 功能,同时多页面切换不会重新加载资源。资源路径会被替换成 `/#/` 的形式。 ```html