Feat/1.2 (#33)

* Add homepage option, fixed #30

* Add custom basePath support, resolve #31
This commit is contained in:
cinwell.li 2016-12-20 21:18:52 +08:00 • committed by GitHub
commit f9d75ab931
5 changed files with 62 additions and 7 deletions

View file

@ -240,3 +240,24 @@ Scroll to the top on changing hash.
<script src="/lib/docsify.js" data-auto2top></script>
```
#### homepage
`README.md` will be render as homepage for your website in docs folder, but sometimes we want to specify another file as a homepage, or even use the `README.md` in your repo. we can use:
```html
<script src="/lib/docsify.js" data-homepage="https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md"></script>
<!-- Or using `Welcome.md` as homepge -->
<script src="/lib/docsify.js" data-homepage="Welcome.md"></script>
```
#### basePath
If your HTML entry file and the markdown files are in different directories, we can use:
```html
<script src="/lib/docsify.js" data-base-path="/base/"></script>
<!-- Even if the docs is on another site 😄 -->
<script src="/lib/docsify.js" data-base-path="https://docsify.js.org/"></script>
```