Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/5.0 #802

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
/themes/*
!.gitkeep
node_modules
/lib/
.idea
lib
.idea

1 change: 1 addition & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
78 changes: 63 additions & 15 deletions docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,72 @@ docsify extends Markdown syntax to make your documents more readable.
Important content like:

```markdown
!> **Time** is money, my friend!
> [!] **Time** is money, my friend!
```

is rendered as:

!> **Time** is money, my friend!
> [!] **Time** is money, my friend!

## General tips

General tips like:

```markdown
?> _TODO_ unit test
> [?] _TODO_ unit test
```

are rendered as:

?> _TODO_ unit test
> [?] _TODO_ unit test

## More tips

```markdown
> [x] bad

> [v] good
```

> [x] bad

> [v] good

## Details

````markdown
> [details] Sample code
>
> js code
>
> ```javascript
> console.log("foo");
> ```

> [details:open] Sample code open
>
> js code
>
> ```javascript
> console.log("foo");
> ```
````

> [details] Sample code
>
> js code
>
> ```javascript
> console.log("foo");
> ```

> [details:open] Sample code open
>
> js code
>
> ```javascript
> console.log("foo");
> ```

## Ignore to compile link

Expand All @@ -39,28 +87,28 @@ It will be compiled to `<a href="/#/demo/">link</a>` and will be loaded `/demo/R
Now you can do that

```md
[link](/demo/ ':ignore')
[link](/demo/ ":ignore")
```

You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set title for link.

```md
[link](/demo/ ':ignore title')
[link](/demo/ ":ignore title")

<a href="/demo/" title="title">link</a>
```

## Set target attribute for link

```md
[link](/demo ':target=_blank')
[link](/demo2 ':target=_self')
[link](/demo ":target=_blank")
[link](/demo2 ":target=_self")
```

## Disable link

```md
[link](/demo ':disabled')
[link](/demo ":disabled")
```

## Github Task Lists
Expand All @@ -84,17 +132,17 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
## Image resizing

```md
![logo](https://docsify.js.org/_media/icon.svg ':size=50x100')
![logo](https://docsify.js.org/_media/icon.svg ':size=100')
![logo](https://docsify.js.org/_media/icon.svg ":size=50x100")
![logo](https://docsify.js.org/_media/icon.svg ":size=100")

<!-- Support percentage -->

![logo](https://docsify.js.org/_media/icon.svg ':size=10%')
![logo](https://docsify.js.org/_media/icon.svg ":size=10%")
```

![logo](https://docsify.js.org/_media/icon.svg ':size=50x100')
![logo](https://docsify.js.org/_media/icon.svg ':size=100')
![logo](https://docsify.js.org/_media/icon.svg ':size=10%')
![logo](https://docsify.js.org/_media/icon.svg ":size=50x100")
![logo](https://docsify.js.org/_media/icon.svg ":size=100")
![logo](https://docsify.js.org/_media/icon.svg ":size=10%")

## Customise ID for headings

Expand Down
224 changes: 131 additions & 93 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,99 +1,137 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>docsify</title>
<link rel="icon" href="_media/favicon.ico" />
<meta
name="google-site-verification"
content="6t0LoIeFksrjF4c9sqUEsVXiQNxLp2hgoqo0KryT-sE"
/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta
name="keywords"
content="doc,docs,documentation,gitbook,creator,generator,github,jekyll,github-pages"
/>
<meta name="description" content="A magical documentation generator." />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<link
rel="stylesheet"
href="//unpkg.com/docsify/lib/themes/vue.css"
title="vue"
/>
<link
rel="stylesheet"
href="//unpkg.com/docsify/lib/themes/dark.css"
title="dark"
disabled
/>
<link
rel="stylesheet"
href="//unpkg.com/docsify/lib/themes/buble.css"
title="buble"
disabled
/>
<link
rel="stylesheet"
href="//unpkg.com/docsify/lib/themes/pure.css"
title="pure"
disabled
/>
<script src="//unpkg.com/docsify-plugin-codefund/index.js"></script>
<style>
nav.app-nav li ul {
min-width: 100px;
}
</style>
</head>

<head>
<meta charset="UTF-8">
<title>docsify</title>
<link rel="icon" href="_media/favicon.ico">
<meta name="google-site-verification" content="6t0LoIeFksrjF4c9sqUEsVXiQNxLp2hgoqo0KryT-sE" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="doc,docs,documentation,gitbook,creator,generator,github,jekyll,github-pages">
<meta name="description" content="A magical documentation generator.">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" title="vue">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css" title="dark" disabled>
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css" title="buble" disabled>
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/pure.css" title="pure" disabled>
<script src="//unpkg.com/docsify-plugin-codefund/index.js"></script>
<style>
nav.app-nav li ul {
min-width: 100px;
}
</style>
</head>

<body>
<div id="app">Loading ...</div>
<script>
window.$docsify = {
alias: {
'.*?/awesome': 'https://github.com/raw/docsifyjs/awesome-docsify/master/README.md',
'.*?/changelog': 'https://github.com/raw/docsifyjs/docsify/master/CHANGELOG.md',
'/.*/_navbar.md': '/_navbar.md',
'/zh-cn/(.*)': 'https://github.com/raw/docsifyjs/docs-zh/master/$1',
'/de-de/(.*)': 'https://github.com/raw/docsifyjs/docs-de/master/$1',
'/ru/(.*)': 'https://github.com/raw/docsifyjs/docs-ru/master/$1',
'/es/(.*)': 'https://github.com/raw/docsifyjs/docs-es/master/$1'
},
auto2top: true,
coverpage: true,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 4,
subMaxLevel: 2,
ga: 'UA-106147152-1',
name: 'docsify',
search: {
noData: {
'/de-de/': 'Keine Ergebnisse!',
'/zh-cn/': '没有结果!',
'/': 'No results!'
<body>
<div id="app">Loading ...</div>
<script>
window.$docsify = {
alias: {
".*?/awesome":
"https://github.com/raw/docsifyjs/awesome-docsify/master/README.md",
".*?/changelog":
"https://github.com/raw/docsifyjs/docsify/master/CHANGELOG.md",
"/.*/_navbar.md": "/_navbar.md",
"/zh-cn/(.*)":
"https://github.com/raw/docsifyjs/docs-zh/master/$1",
"/de-de/(.*)":
"https://github.com/raw/docsifyjs/docs-de/master/$1",
"/ru/(.*)":
"https://github.com/raw/docsifyjs/docs-ru/master/$1",
"/es/(.*)":
"https://github.com/raw/docsifyjs/docs-es/master/$1"
},
paths: 'auto',
placeholder: {
'/de-de/': 'Suche',
'/zh-cn/': '搜索',
'/': 'Search'
}
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function (hook, vm) {
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master')
} else {
url = 'https://github.com/docsifyjs/docsify/blob/master/docs/' + vm.route.file
}
var editHtml = '[:memo: Edit Document](' + url + ')\n'

return editHtml
+ html
+ '\n\n----\n\n'
+ '<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
})
auto2top: true,
coverpage: true,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 4,
subMaxLevel: 2,
ga: "UA-106147152-1",
name: "docsify",
search: {
noData: {
"/de-de/": "Keine Ergebnisse!",
"/zh-cn/": "没有结果!",
"/": "No results!"
},
paths: "auto",
placeholder: {
"/de-de/": "Suche",
"/zh-cn/": "搜索",
"/": "Search"
}
},
DocsifyCodefund.create('fae1f9a4-870c-4c25-b8e0-c80464f7a95c')
]
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>

<script>
((window.gitter = {}).chat = {}).options = {
room: 'docsifyjs/Lobby'
};
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
</body>

formatUpdated: "{MM}/{DD} {HH}:{mm}",
plugins: [
function(hook, vm) {
hook.beforeEach(function(html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace("raw.githubusercontent.com", "github.com")
.replace(/\/master/, "/blob/master");
} else {
url =
"https://github.com/docsifyjs/docsify/blob/master/docs/" +
vm.route.file;
}
var editHtml = "[:memo: Edit Document](" + url + ")\n";
return (
editHtml +
html +
"\n\n----\n\n" +
'<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
);
});
},
DocsifyCodefund.create("fae1f9a4-870c-4c25-b8e0-c80464f7a95c")
]
};
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: "docsifyjs/Lobby"
};
</script>
<script
src="https://sidecar.gitter.im/dist/sidecar.v1.js"
async
defer
></script>
</body>
</html>
Loading