fix: remove lib
This commit is contained in:
parent
082c68ecee
commit
d81a1e89a3
13 changed files with 107 additions and 6516 deletions
|
|
@ -1,40 +1,108 @@
|
||||||
this.$docsify = {
|
module.exports = {
|
||||||
alias: {
|
template: `<!DOCTYPE html>
|
||||||
'.*?/awesome': 'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
|
<html lang="en">
|
||||||
'.*?/changelog': 'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
|
|
||||||
'/.*/_navbar.md': '/_navbar.md',
|
|
||||||
'/zh-cn/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1',
|
|
||||||
'/de-de/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
|
|
||||||
'/ru/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
|
|
||||||
'/es/(.*)': 'https://raw.githubusercontent.com/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!'
|
|
||||||
},
|
|
||||||
paths: 'auto',
|
|
||||||
placeholder: {
|
|
||||||
'/de-de/': 'Suche',
|
|
||||||
'/zh-cn/': '搜索',
|
|
||||||
'/': 'Search'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formatUpdated: '{MM}/{DD} {HH}:{mm}'
|
|
||||||
}
|
|
||||||
|
|
||||||
this.SSR_CONFIG = {
|
<head>
|
||||||
template: 'index.ssr.html',
|
<meta charset="UTF-8">
|
||||||
config: this.$docsify
|
<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>
|
||||||
|
<!--inject-app-->
|
||||||
|
<!--inject-config-->
|
||||||
|
<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>
|
||||||
|
this.$docsify.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>'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
this.DocsifyCodefund && this.DocsifyCodefund.create('fae1f9a4-870c-4c25-b8e0-c80464f7a95c')
|
||||||
|
]
|
||||||
|
</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>
|
||||||
|
`,
|
||||||
|
config: {
|
||||||
|
alias: {
|
||||||
|
'.*?/awesome':
|
||||||
|
'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
|
||||||
|
'.*?/changelog':
|
||||||
|
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
|
||||||
|
'/.*/_navbar.md': '/_navbar.md',
|
||||||
|
'/zh-cn/(.*)':
|
||||||
|
'https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1',
|
||||||
|
'/de-de/(.*)':
|
||||||
|
'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
|
||||||
|
'/ru/(.*)':
|
||||||
|
'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
|
||||||
|
'/es/(.*)':
|
||||||
|
'https://raw.githubusercontent.com/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!'
|
||||||
|
},
|
||||||
|
paths: 'auto',
|
||||||
|
placeholder: {
|
||||||
|
'/de-de/': 'Suche',
|
||||||
|
'/zh-cn/': '搜索',
|
||||||
|
'/': 'Search'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formatUpdated: '{MM}/{DD} {HH}:{mm}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
<!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>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!--inject-app-->
|
|
||||||
<!--inject-config-->
|
|
||||||
<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>
|
|
||||||
this.$docsify.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>'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
this.DocsifyCodefund && this.DocsifyCodefund.create('fae1f9a4-870c-4c25-b8e0-c80464f7a95c')
|
|
||||||
]
|
|
||||||
</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>
|
|
||||||
5126
lib/docsify.js
5126
lib/docsify.js
File diff suppressed because it is too large
Load diff
9
lib/docsify.min.js
vendored
9
lib/docsify.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,903 +0,0 @@
|
||||||
(function () {
|
|
||||||
var AllGithubEmoji = [
|
|
||||||
'+1',
|
|
||||||
'100',
|
|
||||||
'1234',
|
|
||||||
'8ball',
|
|
||||||
'a',
|
|
||||||
'ab',
|
|
||||||
'abc',
|
|
||||||
'abcd',
|
|
||||||
'accept',
|
|
||||||
'aerial_tramway',
|
|
||||||
'airplane',
|
|
||||||
'alarm_clock',
|
|
||||||
'alien',
|
|
||||||
'ambulance',
|
|
||||||
'anchor',
|
|
||||||
'angel',
|
|
||||||
'anger',
|
|
||||||
'angry',
|
|
||||||
'anguished',
|
|
||||||
'ant',
|
|
||||||
'apple',
|
|
||||||
'aquarius',
|
|
||||||
'aries',
|
|
||||||
'arrow_backward',
|
|
||||||
'arrow_double_down',
|
|
||||||
'arrow_double_up',
|
|
||||||
'arrow_down',
|
|
||||||
'arrow_down_small',
|
|
||||||
'arrow_forward',
|
|
||||||
'arrow_heading_down',
|
|
||||||
'arrow_heading_up',
|
|
||||||
'arrow_left',
|
|
||||||
'arrow_lower_left',
|
|
||||||
'arrow_lower_right',
|
|
||||||
'arrow_right',
|
|
||||||
'arrow_right_hook',
|
|
||||||
'arrow_up',
|
|
||||||
'arrow_up_down',
|
|
||||||
'arrow_up_small',
|
|
||||||
'arrow_upper_left',
|
|
||||||
'arrow_upper_right',
|
|
||||||
'arrows_clockwise',
|
|
||||||
'arrows_counterclockwise',
|
|
||||||
'art',
|
|
||||||
'articulated_lorry',
|
|
||||||
'astonished',
|
|
||||||
'athletic_shoe',
|
|
||||||
'atm',
|
|
||||||
'b',
|
|
||||||
'baby',
|
|
||||||
'baby_bottle',
|
|
||||||
'baby_chick',
|
|
||||||
'baby_symbol',
|
|
||||||
'back',
|
|
||||||
'baggage_claim',
|
|
||||||
'balloon',
|
|
||||||
'ballot_box_with_check',
|
|
||||||
'bamboo',
|
|
||||||
'banana',
|
|
||||||
'bangbang',
|
|
||||||
'bank',
|
|
||||||
'bar_chart',
|
|
||||||
'barber',
|
|
||||||
'baseball',
|
|
||||||
'basketball',
|
|
||||||
'bath',
|
|
||||||
'bathtub',
|
|
||||||
'battery',
|
|
||||||
'bear',
|
|
||||||
'bee',
|
|
||||||
'beer',
|
|
||||||
'beers',
|
|
||||||
'beetle',
|
|
||||||
'beginner',
|
|
||||||
'bell',
|
|
||||||
'bento',
|
|
||||||
'bicyclist',
|
|
||||||
'bike',
|
|
||||||
'bikini',
|
|
||||||
'bird',
|
|
||||||
'birthday',
|
|
||||||
'black_circle',
|
|
||||||
'black_joker',
|
|
||||||
'black_large_square',
|
|
||||||
'black_medium_small_square',
|
|
||||||
'black_medium_square',
|
|
||||||
'black_nib',
|
|
||||||
'black_small_square',
|
|
||||||
'black_square_button',
|
|
||||||
'blossom',
|
|
||||||
'blowfish',
|
|
||||||
'blue_book',
|
|
||||||
'blue_car',
|
|
||||||
'blue_heart',
|
|
||||||
'blush',
|
|
||||||
'boar',
|
|
||||||
'boat',
|
|
||||||
'bomb',
|
|
||||||
'book',
|
|
||||||
'bookmark',
|
|
||||||
'bookmark_tabs',
|
|
||||||
'books',
|
|
||||||
'boom',
|
|
||||||
'boot',
|
|
||||||
'bouquet',
|
|
||||||
'bow',
|
|
||||||
'bowling',
|
|
||||||
'bowtie',
|
|
||||||
'boy',
|
|
||||||
'bread',
|
|
||||||
'bride_with_veil',
|
|
||||||
'bridge_at_night',
|
|
||||||
'briefcase',
|
|
||||||
'broken_heart',
|
|
||||||
'bug',
|
|
||||||
'bulb',
|
|
||||||
'bullettrain_front',
|
|
||||||
'bullettrain_side',
|
|
||||||
'bus',
|
|
||||||
'busstop',
|
|
||||||
'bust_in_silhouette',
|
|
||||||
'busts_in_silhouette',
|
|
||||||
'cactus',
|
|
||||||
'cake',
|
|
||||||
'calendar',
|
|
||||||
'calling',
|
|
||||||
'camel',
|
|
||||||
'camera',
|
|
||||||
'cancer',
|
|
||||||
'candy',
|
|
||||||
'capital_abcd',
|
|
||||||
'capricorn',
|
|
||||||
'car',
|
|
||||||
'card_index',
|
|
||||||
'carousel_horse',
|
|
||||||
'cat',
|
|
||||||
'cat2',
|
|
||||||
'cd',
|
|
||||||
'chart',
|
|
||||||
'chart_with_downwards_trend',
|
|
||||||
'chart_with_upwards_trend',
|
|
||||||
'checkered_flag',
|
|
||||||
'cherries',
|
|
||||||
'cherry_blossom',
|
|
||||||
'chestnut',
|
|
||||||
'chicken',
|
|
||||||
'children_crossing',
|
|
||||||
'chocolate_bar',
|
|
||||||
'christmas_tree',
|
|
||||||
'church',
|
|
||||||
'cinema',
|
|
||||||
'circus_tent',
|
|
||||||
'city_sunrise',
|
|
||||||
'city_sunset',
|
|
||||||
'cl',
|
|
||||||
'clap',
|
|
||||||
'clapper',
|
|
||||||
'clipboard',
|
|
||||||
'clock1',
|
|
||||||
'clock10',
|
|
||||||
'clock1030',
|
|
||||||
'clock11',
|
|
||||||
'clock1130',
|
|
||||||
'clock12',
|
|
||||||
'clock1230',
|
|
||||||
'clock130',
|
|
||||||
'clock2',
|
|
||||||
'clock230',
|
|
||||||
'clock3',
|
|
||||||
'clock330',
|
|
||||||
'clock4',
|
|
||||||
'clock430',
|
|
||||||
'clock5',
|
|
||||||
'clock530',
|
|
||||||
'clock6',
|
|
||||||
'clock630',
|
|
||||||
'clock7',
|
|
||||||
'clock730',
|
|
||||||
'clock8',
|
|
||||||
'clock830',
|
|
||||||
'clock9',
|
|
||||||
'clock930',
|
|
||||||
'closed_book',
|
|
||||||
'closed_lock_with_key',
|
|
||||||
'closed_umbrella',
|
|
||||||
'cloud',
|
|
||||||
'clubs',
|
|
||||||
'cn',
|
|
||||||
'cocktail',
|
|
||||||
'coffee',
|
|
||||||
'cold_sweat',
|
|
||||||
'collision',
|
|
||||||
'computer',
|
|
||||||
'confetti_ball',
|
|
||||||
'confounded',
|
|
||||||
'confused',
|
|
||||||
'congratulations',
|
|
||||||
'construction',
|
|
||||||
'construction_worker',
|
|
||||||
'convenience_store',
|
|
||||||
'cookie',
|
|
||||||
'cool',
|
|
||||||
'cop',
|
|
||||||
'copyright',
|
|
||||||
'corn',
|
|
||||||
'couple',
|
|
||||||
'couple_with_heart',
|
|
||||||
'couplekiss',
|
|
||||||
'cow',
|
|
||||||
'cow2',
|
|
||||||
'credit_card',
|
|
||||||
'crescent_moon',
|
|
||||||
'crocodile',
|
|
||||||
'crossed_flags',
|
|
||||||
'crown',
|
|
||||||
'cry',
|
|
||||||
'crying_cat_face',
|
|
||||||
'crystal_ball',
|
|
||||||
'cupid',
|
|
||||||
'curly_loop',
|
|
||||||
'currency_exchange',
|
|
||||||
'curry',
|
|
||||||
'custard',
|
|
||||||
'customs',
|
|
||||||
'cyclone',
|
|
||||||
'dancer',
|
|
||||||
'dancers',
|
|
||||||
'dango',
|
|
||||||
'dart',
|
|
||||||
'dash',
|
|
||||||
'date',
|
|
||||||
'de',
|
|
||||||
'deciduous_tree',
|
|
||||||
'department_store',
|
|
||||||
'diamond_shape_with_a_dot_inside',
|
|
||||||
'diamonds',
|
|
||||||
'disappointed',
|
|
||||||
'disappointed_relieved',
|
|
||||||
'dizzy',
|
|
||||||
'dizzy_face',
|
|
||||||
'do_not_litter',
|
|
||||||
'dog',
|
|
||||||
'dog2',
|
|
||||||
'dollar',
|
|
||||||
'dolls',
|
|
||||||
'dolphin',
|
|
||||||
'door',
|
|
||||||
'doughnut',
|
|
||||||
'dragon',
|
|
||||||
'dragon_face',
|
|
||||||
'dress',
|
|
||||||
'dromedary_camel',
|
|
||||||
'droplet',
|
|
||||||
'dvd',
|
|
||||||
'e-mail',
|
|
||||||
'ear',
|
|
||||||
'ear_of_rice',
|
|
||||||
'earth_africa',
|
|
||||||
'earth_americas',
|
|
||||||
'earth_asia',
|
|
||||||
'egg',
|
|
||||||
'eggplant',
|
|
||||||
'eight',
|
|
||||||
'eight_pointed_black_star',
|
|
||||||
'eight_spoked_asterisk',
|
|
||||||
'electric_plug',
|
|
||||||
'elephant',
|
|
||||||
'email',
|
|
||||||
'end',
|
|
||||||
'envelope',
|
|
||||||
'envelope_with_arrow',
|
|
||||||
'es',
|
|
||||||
'euro',
|
|
||||||
'european_castle',
|
|
||||||
'european_post_office',
|
|
||||||
'evergreen_tree',
|
|
||||||
'exclamation',
|
|
||||||
'expressionless',
|
|
||||||
'eyeglasses',
|
|
||||||
'eyes',
|
|
||||||
'facepunch',
|
|
||||||
'factory',
|
|
||||||
'fallen_leaf',
|
|
||||||
'family',
|
|
||||||
'fast_forward',
|
|
||||||
'fax',
|
|
||||||
'fearful',
|
|
||||||
'feelsgood',
|
|
||||||
'feet',
|
|
||||||
'ferris_wheel',
|
|
||||||
'file_folder',
|
|
||||||
'finnadie',
|
|
||||||
'fire',
|
|
||||||
'fire_engine',
|
|
||||||
'fireworks',
|
|
||||||
'first_quarter_moon',
|
|
||||||
'first_quarter_moon_with_face',
|
|
||||||
'fish',
|
|
||||||
'fish_cake',
|
|
||||||
'fishing_pole_and_fish',
|
|
||||||
'fist',
|
|
||||||
'five',
|
|
||||||
'flags',
|
|
||||||
'flashlight',
|
|
||||||
'flipper',
|
|
||||||
'floppy_disk',
|
|
||||||
'flower_playing_cards',
|
|
||||||
'flushed',
|
|
||||||
'foggy',
|
|
||||||
'football',
|
|
||||||
'footprints',
|
|
||||||
'fork_and_knife',
|
|
||||||
'fountain',
|
|
||||||
'four',
|
|
||||||
'four_leaf_clover',
|
|
||||||
'fr',
|
|
||||||
'free',
|
|
||||||
'fried_shrimp',
|
|
||||||
'fries',
|
|
||||||
'frog',
|
|
||||||
'frowning',
|
|
||||||
'fu',
|
|
||||||
'fuelpump',
|
|
||||||
'full_moon',
|
|
||||||
'full_moon_with_face',
|
|
||||||
'game_die',
|
|
||||||
'gb',
|
|
||||||
'gem',
|
|
||||||
'gemini',
|
|
||||||
'ghost',
|
|
||||||
'gift',
|
|
||||||
'gift_heart',
|
|
||||||
'girl',
|
|
||||||
'globe_with_meridians',
|
|
||||||
'goat',
|
|
||||||
'goberserk',
|
|
||||||
'godmode',
|
|
||||||
'golf',
|
|
||||||
'grapes',
|
|
||||||
'green_apple',
|
|
||||||
'green_book',
|
|
||||||
'green_heart',
|
|
||||||
'grey_exclamation',
|
|
||||||
'grey_question',
|
|
||||||
'grimacing',
|
|
||||||
'grin',
|
|
||||||
'grinning',
|
|
||||||
'guardsman',
|
|
||||||
'guitar',
|
|
||||||
'gun',
|
|
||||||
'haircut',
|
|
||||||
'hamburger',
|
|
||||||
'hammer',
|
|
||||||
'hamster',
|
|
||||||
'hand',
|
|
||||||
'handbag',
|
|
||||||
'hankey',
|
|
||||||
'hash',
|
|
||||||
'hatched_chick',
|
|
||||||
'hatching_chick',
|
|
||||||
'headphones',
|
|
||||||
'hear_no_evil',
|
|
||||||
'heart',
|
|
||||||
'heart_decoration',
|
|
||||||
'heart_eyes',
|
|
||||||
'heart_eyes_cat',
|
|
||||||
'heartbeat',
|
|
||||||
'heartpulse',
|
|
||||||
'hearts',
|
|
||||||
'heavy_check_mark',
|
|
||||||
'heavy_division_sign',
|
|
||||||
'heavy_dollar_sign',
|
|
||||||
'heavy_exclamation_mark',
|
|
||||||
'heavy_minus_sign',
|
|
||||||
'heavy_multiplication_x',
|
|
||||||
'heavy_plus_sign',
|
|
||||||
'helicopter',
|
|
||||||
'herb',
|
|
||||||
'hibiscus',
|
|
||||||
'high_brightness',
|
|
||||||
'high_heel',
|
|
||||||
'hocho',
|
|
||||||
'honey_pot',
|
|
||||||
'honeybee',
|
|
||||||
'horse',
|
|
||||||
'horse_racing',
|
|
||||||
'hospital',
|
|
||||||
'hotel',
|
|
||||||
'hotsprings',
|
|
||||||
'hourglass',
|
|
||||||
'hourglass_flowing_sand',
|
|
||||||
'house',
|
|
||||||
'house_with_garden',
|
|
||||||
'hurtrealbad',
|
|
||||||
'hushed',
|
|
||||||
'ice_cream',
|
|
||||||
'icecream',
|
|
||||||
'id',
|
|
||||||
'ideograph_advantage',
|
|
||||||
'imp',
|
|
||||||
'inbox_tray',
|
|
||||||
'incoming_envelope',
|
|
||||||
'information_desk_person',
|
|
||||||
'information_source',
|
|
||||||
'innocent',
|
|
||||||
'interrobang',
|
|
||||||
'iphone',
|
|
||||||
'it',
|
|
||||||
'izakaya_lantern',
|
|
||||||
'jack_o_lantern',
|
|
||||||
'japan',
|
|
||||||
'japanese_castle',
|
|
||||||
'japanese_goblin',
|
|
||||||
'japanese_ogre',
|
|
||||||
'jeans',
|
|
||||||
'joy',
|
|
||||||
'joy_cat',
|
|
||||||
'jp',
|
|
||||||
'key',
|
|
||||||
'keycap_ten',
|
|
||||||
'kimono',
|
|
||||||
'kiss',
|
|
||||||
'kissing',
|
|
||||||
'kissing_cat',
|
|
||||||
'kissing_closed_eyes',
|
|
||||||
'kissing_heart',
|
|
||||||
'kissing_smiling_eyes',
|
|
||||||
'koala',
|
|
||||||
'koko',
|
|
||||||
'kr',
|
|
||||||
'lantern',
|
|
||||||
'large_blue_circle',
|
|
||||||
'large_blue_diamond',
|
|
||||||
'large_orange_diamond',
|
|
||||||
'last_quarter_moon',
|
|
||||||
'last_quarter_moon_with_face',
|
|
||||||
'laughing',
|
|
||||||
'leaves',
|
|
||||||
'ledger',
|
|
||||||
'left_luggage',
|
|
||||||
'left_right_arrow',
|
|
||||||
'leftwards_arrow_with_hook',
|
|
||||||
'lemon',
|
|
||||||
'leo',
|
|
||||||
'leopard',
|
|
||||||
'libra',
|
|
||||||
'light_rail',
|
|
||||||
'link',
|
|
||||||
'lips',
|
|
||||||
'lipstick',
|
|
||||||
'lock',
|
|
||||||
'lock_with_ink_pen',
|
|
||||||
'lollipop',
|
|
||||||
'loop',
|
|
||||||
'loud_sound',
|
|
||||||
'loudspeaker',
|
|
||||||
'love_hotel',
|
|
||||||
'love_letter',
|
|
||||||
'low_brightness',
|
|
||||||
'm',
|
|
||||||
'mag',
|
|
||||||
'mag_right',
|
|
||||||
'mahjong',
|
|
||||||
'mailbox',
|
|
||||||
'mailbox_closed',
|
|
||||||
'mailbox_with_mail',
|
|
||||||
'mailbox_with_no_mail',
|
|
||||||
'man',
|
|
||||||
'man_with_gua_pi_mao',
|
|
||||||
'man_with_turban',
|
|
||||||
'mans_shoe',
|
|
||||||
'maple_leaf',
|
|
||||||
'mask',
|
|
||||||
'massage',
|
|
||||||
'meat_on_bone',
|
|
||||||
'mega',
|
|
||||||
'melon',
|
|
||||||
'memo',
|
|
||||||
'mens',
|
|
||||||
'metal',
|
|
||||||
'metro',
|
|
||||||
'microphone',
|
|
||||||
'microscope',
|
|
||||||
'milky_way',
|
|
||||||
'minibus',
|
|
||||||
'minidisc',
|
|
||||||
'mobile_phone_off',
|
|
||||||
'money_with_wings',
|
|
||||||
'moneybag',
|
|
||||||
'monkey',
|
|
||||||
'monkey_face',
|
|
||||||
'monorail',
|
|
||||||
'moon',
|
|
||||||
'mortar_board',
|
|
||||||
'mount_fuji',
|
|
||||||
'mountain_bicyclist',
|
|
||||||
'mountain_cableway',
|
|
||||||
'mountain_railway',
|
|
||||||
'mouse',
|
|
||||||
'mouse2',
|
|
||||||
'movie_camera',
|
|
||||||
'moyai',
|
|
||||||
'muscle',
|
|
||||||
'mushroom',
|
|
||||||
'musical_keyboard',
|
|
||||||
'musical_note',
|
|
||||||
'musical_score',
|
|
||||||
'mute',
|
|
||||||
'nail_care',
|
|
||||||
'name_badge',
|
|
||||||
'neckbeard',
|
|
||||||
'necktie',
|
|
||||||
'negative_squared_cross_mark',
|
|
||||||
'neutral_face',
|
|
||||||
'new',
|
|
||||||
'new_moon',
|
|
||||||
'new_moon_with_face',
|
|
||||||
'newspaper',
|
|
||||||
'ng',
|
|
||||||
'night_with_stars',
|
|
||||||
'nine',
|
|
||||||
'no_bell',
|
|
||||||
'no_bicycles',
|
|
||||||
'no_entry',
|
|
||||||
'no_entry_sign',
|
|
||||||
'no_good',
|
|
||||||
'no_mobile_phones',
|
|
||||||
'no_mouth',
|
|
||||||
'no_pedestrians',
|
|
||||||
'no_smoking',
|
|
||||||
'non-potable_water',
|
|
||||||
'nose',
|
|
||||||
'notebook',
|
|
||||||
'notebook_with_decorative_cover',
|
|
||||||
'notes',
|
|
||||||
'nut_and_bolt',
|
|
||||||
'o',
|
|
||||||
'o2',
|
|
||||||
'ocean',
|
|
||||||
'octocat',
|
|
||||||
'octopus',
|
|
||||||
'oden',
|
|
||||||
'office',
|
|
||||||
'ok',
|
|
||||||
'ok_hand',
|
|
||||||
'ok_woman',
|
|
||||||
'older_man',
|
|
||||||
'older_woman',
|
|
||||||
'on',
|
|
||||||
'oncoming_automobile',
|
|
||||||
'oncoming_bus',
|
|
||||||
'oncoming_police_car',
|
|
||||||
'oncoming_taxi',
|
|
||||||
'one',
|
|
||||||
'open_book',
|
|
||||||
'open_file_folder',
|
|
||||||
'open_hands',
|
|
||||||
'open_mouth',
|
|
||||||
'ophiuchus',
|
|
||||||
'orange_book',
|
|
||||||
'outbox_tray',
|
|
||||||
'ox',
|
|
||||||
'package',
|
|
||||||
'page_facing_up',
|
|
||||||
'page_with_curl',
|
|
||||||
'pager',
|
|
||||||
'palm_tree',
|
|
||||||
'panda_face',
|
|
||||||
'paperclip',
|
|
||||||
'parking',
|
|
||||||
'part_alternation_mark',
|
|
||||||
'partly_sunny',
|
|
||||||
'passport_control',
|
|
||||||
'paw_prints',
|
|
||||||
'peach',
|
|
||||||
'pear',
|
|
||||||
'pencil',
|
|
||||||
'pencil2',
|
|
||||||
'penguin',
|
|
||||||
'pensive',
|
|
||||||
'performing_arts',
|
|
||||||
'persevere',
|
|
||||||
'person_frowning',
|
|
||||||
'person_with_blond_hair',
|
|
||||||
'person_with_pouting_face',
|
|
||||||
'phone',
|
|
||||||
'pig',
|
|
||||||
'pig2',
|
|
||||||
'pig_nose',
|
|
||||||
'pill',
|
|
||||||
'pineapple',
|
|
||||||
'pisces',
|
|
||||||
'pizza',
|
|
||||||
'point_down',
|
|
||||||
'point_left',
|
|
||||||
'point_right',
|
|
||||||
'point_up',
|
|
||||||
'point_up_2',
|
|
||||||
'police_car',
|
|
||||||
'poodle',
|
|
||||||
'poop',
|
|
||||||
'post_office',
|
|
||||||
'postal_horn',
|
|
||||||
'postbox',
|
|
||||||
'potable_water',
|
|
||||||
'pouch',
|
|
||||||
'poultry_leg',
|
|
||||||
'pound',
|
|
||||||
'pouting_cat',
|
|
||||||
'pray',
|
|
||||||
'princess',
|
|
||||||
'punch',
|
|
||||||
'purple_heart',
|
|
||||||
'purse',
|
|
||||||
'pushpin',
|
|
||||||
'put_litter_in_its_place',
|
|
||||||
'question',
|
|
||||||
'rabbit',
|
|
||||||
'rabbit2',
|
|
||||||
'racehorse',
|
|
||||||
'radio',
|
|
||||||
'radio_button',
|
|
||||||
'rage',
|
|
||||||
'rage1',
|
|
||||||
'rage2',
|
|
||||||
'rage3',
|
|
||||||
'rage4',
|
|
||||||
'railway_car',
|
|
||||||
'rainbow',
|
|
||||||
'raised_hand',
|
|
||||||
'raised_hands',
|
|
||||||
'raising_hand',
|
|
||||||
'ram',
|
|
||||||
'ramen',
|
|
||||||
'rat',
|
|
||||||
'recycle',
|
|
||||||
'red_car',
|
|
||||||
'red_circle',
|
|
||||||
'registered',
|
|
||||||
'relaxed',
|
|
||||||
'relieved',
|
|
||||||
'repeat',
|
|
||||||
'repeat_one',
|
|
||||||
'restroom',
|
|
||||||
'revolving_hearts',
|
|
||||||
'rewind',
|
|
||||||
'ribbon',
|
|
||||||
'rice',
|
|
||||||
'rice_ball',
|
|
||||||
'rice_cracker',
|
|
||||||
'rice_scene',
|
|
||||||
'ring',
|
|
||||||
'rocket',
|
|
||||||
'roller_coaster',
|
|
||||||
'rooster',
|
|
||||||
'rose',
|
|
||||||
'rotating_light',
|
|
||||||
'round_pushpin',
|
|
||||||
'rowboat',
|
|
||||||
'ru',
|
|
||||||
'rugby_football',
|
|
||||||
'runner',
|
|
||||||
'running',
|
|
||||||
'running_shirt_with_sash',
|
|
||||||
'sa',
|
|
||||||
'sagittarius',
|
|
||||||
'sailboat',
|
|
||||||
'sake',
|
|
||||||
'sandal',
|
|
||||||
'santa',
|
|
||||||
'satellite',
|
|
||||||
'satisfied',
|
|
||||||
'saxophone',
|
|
||||||
'school',
|
|
||||||
'school_satchel',
|
|
||||||
'scissors',
|
|
||||||
'scorpius',
|
|
||||||
'scream',
|
|
||||||
'scream_cat',
|
|
||||||
'scroll',
|
|
||||||
'seat',
|
|
||||||
'secret',
|
|
||||||
'see_no_evil',
|
|
||||||
'seedling',
|
|
||||||
'seven',
|
|
||||||
'shaved_ice',
|
|
||||||
'sheep',
|
|
||||||
'shell',
|
|
||||||
'ship',
|
|
||||||
'shipit',
|
|
||||||
'shirt',
|
|
||||||
'shit',
|
|
||||||
'shoe',
|
|
||||||
'shower',
|
|
||||||
'signal_strength',
|
|
||||||
'six',
|
|
||||||
'six_pointed_star',
|
|
||||||
'ski',
|
|
||||||
'skull',
|
|
||||||
'sleeping',
|
|
||||||
'sleepy',
|
|
||||||
'slot_machine',
|
|
||||||
'small_blue_diamond',
|
|
||||||
'small_orange_diamond',
|
|
||||||
'small_red_triangle',
|
|
||||||
'small_red_triangle_down',
|
|
||||||
'smile',
|
|
||||||
'smile_cat',
|
|
||||||
'smiley',
|
|
||||||
'smiley_cat',
|
|
||||||
'smiling_imp',
|
|
||||||
'smirk',
|
|
||||||
'smirk_cat',
|
|
||||||
'smoking',
|
|
||||||
'snail',
|
|
||||||
'snake',
|
|
||||||
'snowboarder',
|
|
||||||
'snowflake',
|
|
||||||
'snowman',
|
|
||||||
'sob',
|
|
||||||
'soccer',
|
|
||||||
'soon',
|
|
||||||
'sos',
|
|
||||||
'sound',
|
|
||||||
'space_invader',
|
|
||||||
'spades',
|
|
||||||
'spaghetti',
|
|
||||||
'sparkle',
|
|
||||||
'sparkler',
|
|
||||||
'sparkles',
|
|
||||||
'sparkling_heart',
|
|
||||||
'speak_no_evil',
|
|
||||||
'speaker',
|
|
||||||
'speech_balloon',
|
|
||||||
'speedboat',
|
|
||||||
'squirrel',
|
|
||||||
'star',
|
|
||||||
'star2',
|
|
||||||
'stars',
|
|
||||||
'station',
|
|
||||||
'statue_of_liberty',
|
|
||||||
'steam_locomotive',
|
|
||||||
'stew',
|
|
||||||
'straight_ruler',
|
|
||||||
'strawberry',
|
|
||||||
'stuck_out_tongue',
|
|
||||||
'stuck_out_tongue_closed_eyes',
|
|
||||||
'stuck_out_tongue_winking_eye',
|
|
||||||
'sun_with_face',
|
|
||||||
'sunflower',
|
|
||||||
'sunglasses',
|
|
||||||
'sunny',
|
|
||||||
'sunrise',
|
|
||||||
'sunrise_over_mountains',
|
|
||||||
'surfer',
|
|
||||||
'sushi',
|
|
||||||
'suspect',
|
|
||||||
'suspension_railway',
|
|
||||||
'sweat',
|
|
||||||
'sweat_drops',
|
|
||||||
'sweat_smile',
|
|
||||||
'sweet_potato',
|
|
||||||
'swimmer',
|
|
||||||
'symbols',
|
|
||||||
'syringe',
|
|
||||||
'tada',
|
|
||||||
'tanabata_tree',
|
|
||||||
'tangerine',
|
|
||||||
'taurus',
|
|
||||||
'taxi',
|
|
||||||
'tea',
|
|
||||||
'telephone',
|
|
||||||
'telephone_receiver',
|
|
||||||
'telescope',
|
|
||||||
'tennis',
|
|
||||||
'tent',
|
|
||||||
'thought_balloon',
|
|
||||||
'three',
|
|
||||||
'thumbsdown',
|
|
||||||
'thumbsup',
|
|
||||||
'ticket',
|
|
||||||
'tiger',
|
|
||||||
'tiger2',
|
|
||||||
'tired_face',
|
|
||||||
'tm',
|
|
||||||
'toilet',
|
|
||||||
'tokyo_tower',
|
|
||||||
'tomato',
|
|
||||||
'tongue',
|
|
||||||
'top',
|
|
||||||
'tophat',
|
|
||||||
'tractor',
|
|
||||||
'traffic_light',
|
|
||||||
'train',
|
|
||||||
'train2',
|
|
||||||
'tram',
|
|
||||||
'triangular_flag_on_post',
|
|
||||||
'triangular_ruler',
|
|
||||||
'trident',
|
|
||||||
'triumph',
|
|
||||||
'trolleybus',
|
|
||||||
'trollface',
|
|
||||||
'trophy',
|
|
||||||
'tropical_drink',
|
|
||||||
'tropical_fish',
|
|
||||||
'truck',
|
|
||||||
'trumpet',
|
|
||||||
'tshirt',
|
|
||||||
'tulip',
|
|
||||||
'turtle',
|
|
||||||
'tv',
|
|
||||||
'twisted_rightwards_arrows',
|
|
||||||
'two',
|
|
||||||
'two_hearts',
|
|
||||||
'two_men_holding_hands',
|
|
||||||
'two_women_holding_hands',
|
|
||||||
'u5272',
|
|
||||||
'u5408',
|
|
||||||
'u55b6',
|
|
||||||
'u6307',
|
|
||||||
'u6708',
|
|
||||||
'u6709',
|
|
||||||
'u6e80',
|
|
||||||
'u7121',
|
|
||||||
'u7533',
|
|
||||||
'u7981',
|
|
||||||
'u7a7a',
|
|
||||||
'uk',
|
|
||||||
'umbrella',
|
|
||||||
'unamused',
|
|
||||||
'underage',
|
|
||||||
'unlock',
|
|
||||||
'up',
|
|
||||||
'us',
|
|
||||||
'v',
|
|
||||||
'vertical_traffic_light',
|
|
||||||
'vhs',
|
|
||||||
'vibration_mode',
|
|
||||||
'video_camera',
|
|
||||||
'video_game',
|
|
||||||
'violin',
|
|
||||||
'virgo',
|
|
||||||
'volcano',
|
|
||||||
'vs',
|
|
||||||
'walking',
|
|
||||||
'waning_crescent_moon',
|
|
||||||
'waning_gibbous_moon',
|
|
||||||
'warning',
|
|
||||||
'watch',
|
|
||||||
'water_buffalo',
|
|
||||||
'watermelon',
|
|
||||||
'wave',
|
|
||||||
'wavy_dash',
|
|
||||||
'waxing_crescent_moon',
|
|
||||||
'waxing_gibbous_moon',
|
|
||||||
'wc',
|
|
||||||
'weary',
|
|
||||||
'wedding',
|
|
||||||
'whale',
|
|
||||||
'whale2',
|
|
||||||
'wheelchair',
|
|
||||||
'white_check_mark',
|
|
||||||
'white_circle',
|
|
||||||
'white_flower',
|
|
||||||
'white_large_square',
|
|
||||||
'white_medium_small_square',
|
|
||||||
'white_medium_square',
|
|
||||||
'white_small_square',
|
|
||||||
'white_square_button',
|
|
||||||
'wind_chime',
|
|
||||||
'wine_glass',
|
|
||||||
'wink',
|
|
||||||
'wolf',
|
|
||||||
'woman',
|
|
||||||
'womans_clothes',
|
|
||||||
'womans_hat',
|
|
||||||
'womens',
|
|
||||||
'worried',
|
|
||||||
'wrench',
|
|
||||||
'x',
|
|
||||||
'yellow_heart',
|
|
||||||
'yen',
|
|
||||||
'yum',
|
|
||||||
'zap',
|
|
||||||
'zero',
|
|
||||||
'zzz'
|
|
||||||
];
|
|
||||||
|
|
||||||
// Emoji from All-Github-Emoji-Icons
|
|
||||||
// https://github.com/scotch-io/All-Github-Emoji-Icons
|
|
||||||
window.emojify = function (match, $1) {
|
|
||||||
return AllGithubEmoji.indexOf($1) === -1 ?
|
|
||||||
match :
|
|
||||||
'<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/' +
|
|
||||||
$1 +
|
|
||||||
'.png" alt="' +
|
|
||||||
$1 +
|
|
||||||
'" />'
|
|
||||||
};
|
|
||||||
|
|
||||||
}());
|
|
||||||
1
lib/plugins/emoji.min.js
vendored
1
lib/plugins/emoji.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,364 +0,0 @@
|
||||||
(function () {
|
|
||||||
var INDEXS = {};
|
|
||||||
|
|
||||||
var LOCAL_STORAGE = {
|
|
||||||
EXPIRE_KEY: 'docsify.search.expires',
|
|
||||||
INDEX_KEY: 'docsify.search.index'
|
|
||||||
};
|
|
||||||
|
|
||||||
function resolveExpireKey(namespace) {
|
|
||||||
return namespace ? ((LOCAL_STORAGE.EXPIRE_KEY) + "/" + namespace) : LOCAL_STORAGE.EXPIRE_KEY
|
|
||||||
}
|
|
||||||
function resolveIndexKey(namespace) {
|
|
||||||
return namespace ? ((LOCAL_STORAGE.INDEX_KEY) + "/" + namespace) : LOCAL_STORAGE.INDEX_KEY
|
|
||||||
}
|
|
||||||
|
|
||||||
function escapeHtml(string) {
|
|
||||||
var entityMap = {
|
|
||||||
'&': '&',
|
|
||||||
'<': '<',
|
|
||||||
'>': '>',
|
|
||||||
'"': '"',
|
|
||||||
'\'': ''',
|
|
||||||
'/': '/'
|
|
||||||
};
|
|
||||||
|
|
||||||
return String(string).replace(/[&<>"'/]/g, function (s) { return entityMap[s]; })
|
|
||||||
}
|
|
||||||
|
|
||||||
function getAllPaths(router) {
|
|
||||||
var paths = [];
|
|
||||||
|
|
||||||
Docsify.dom.findAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(function (node) {
|
|
||||||
var href = node.href;
|
|
||||||
var originHref = node.getAttribute('href');
|
|
||||||
var path = router.parse(href).path;
|
|
||||||
|
|
||||||
if (
|
|
||||||
path &&
|
|
||||||
paths.indexOf(path) === -1 &&
|
|
||||||
!Docsify.util.isAbsolutePath(originHref)
|
|
||||||
) {
|
|
||||||
paths.push(path);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return paths
|
|
||||||
}
|
|
||||||
|
|
||||||
function saveData(maxAge, expireKey, indexKey) {
|
|
||||||
localStorage.setItem(expireKey, Date.now() + maxAge);
|
|
||||||
localStorage.setItem(indexKey, JSON.stringify(INDEXS));
|
|
||||||
}
|
|
||||||
|
|
||||||
function genIndex(path, content, router, depth) {
|
|
||||||
if ( content === void 0 ) content = '';
|
|
||||||
|
|
||||||
var tokens = window.marked.lexer(content);
|
|
||||||
var slugify = window.Docsify.slugify;
|
|
||||||
var index = {};
|
|
||||||
var slug;
|
|
||||||
|
|
||||||
tokens.forEach(function (token) {
|
|
||||||
if (token.type === 'heading' && token.depth <= depth) {
|
|
||||||
slug = router.toURL(path, {id: slugify(token.text)});
|
|
||||||
index[slug] = {slug: slug, title: token.text, body: ''};
|
|
||||||
} else {
|
|
||||||
if (!slug) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!index[slug]) {
|
|
||||||
index[slug] = {slug: slug, title: '', body: ''};
|
|
||||||
} else if (index[slug].body) {
|
|
||||||
index[slug].body += '\n' + (token.text || '');
|
|
||||||
} else {
|
|
||||||
index[slug].body = token.text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
slugify.clear();
|
|
||||||
return index
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {String} query
|
|
||||||
* @returns {Array}
|
|
||||||
*/
|
|
||||||
function search(query) {
|
|
||||||
var matchingResults = [];
|
|
||||||
var data = [];
|
|
||||||
Object.keys(INDEXS).forEach(function (key) {
|
|
||||||
data = data.concat(Object.keys(INDEXS[key]).map(function (page) { return INDEXS[key][page]; }));
|
|
||||||
});
|
|
||||||
|
|
||||||
query = query.trim();
|
|
||||||
var keywords = query.split(/[\s\-,\\/]+/);
|
|
||||||
if (keywords.length !== 1) {
|
|
||||||
keywords = [].concat(query, keywords);
|
|
||||||
}
|
|
||||||
|
|
||||||
var loop = function ( i ) {
|
|
||||||
var post = data[i];
|
|
||||||
var isMatch = false;
|
|
||||||
var resultStr = '';
|
|
||||||
var postTitle = post.title && post.title.trim();
|
|
||||||
var postContent = post.body && post.body.trim();
|
|
||||||
var postUrl = post.slug || '';
|
|
||||||
|
|
||||||
if (postTitle && postContent) {
|
|
||||||
keywords.forEach(function (keyword) {
|
|
||||||
// From https://github.com/sindresorhus/escape-string-regexp
|
|
||||||
var regEx = new RegExp(
|
|
||||||
keyword.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&'),
|
|
||||||
'gi'
|
|
||||||
);
|
|
||||||
var indexTitle = -1;
|
|
||||||
var indexContent = -1;
|
|
||||||
|
|
||||||
indexTitle = postTitle && postTitle.search(regEx);
|
|
||||||
indexContent = postContent && postContent.search(regEx);
|
|
||||||
|
|
||||||
if (indexTitle < 0 && indexContent < 0) {
|
|
||||||
isMatch = false;
|
|
||||||
} else {
|
|
||||||
isMatch = true;
|
|
||||||
if (indexContent < 0) {
|
|
||||||
indexContent = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
var start = 0;
|
|
||||||
var end = 0;
|
|
||||||
|
|
||||||
start = indexContent < 11 ? 0 : indexContent - 10;
|
|
||||||
end = start === 0 ? 70 : indexContent + keyword.length + 60;
|
|
||||||
|
|
||||||
if (end > postContent.length) {
|
|
||||||
end = postContent.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
var matchContent =
|
|
||||||
'...' +
|
|
||||||
escapeHtml(postContent)
|
|
||||||
.substring(start, end)
|
|
||||||
.replace(regEx, ("<em class=\"search-keyword\">" + keyword + "</em>")) +
|
|
||||||
'...';
|
|
||||||
|
|
||||||
resultStr += matchContent;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (isMatch) {
|
|
||||||
var matchingPost = {
|
|
||||||
title: escapeHtml(postTitle),
|
|
||||||
content: resultStr,
|
|
||||||
url: postUrl
|
|
||||||
};
|
|
||||||
|
|
||||||
matchingResults.push(matchingPost);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
for (var i = 0; i < data.length; i++) loop( i );
|
|
||||||
|
|
||||||
return matchingResults
|
|
||||||
}
|
|
||||||
|
|
||||||
function init$1(config, vm) {
|
|
||||||
var isAuto = config.paths === 'auto';
|
|
||||||
|
|
||||||
var expireKey = resolveExpireKey(config.namespace);
|
|
||||||
var indexKey = resolveIndexKey(config.namespace);
|
|
||||||
|
|
||||||
var isExpired = localStorage.getItem(expireKey) < Date.now();
|
|
||||||
|
|
||||||
INDEXS = JSON.parse(localStorage.getItem(indexKey));
|
|
||||||
|
|
||||||
if (isExpired) {
|
|
||||||
INDEXS = {};
|
|
||||||
} else if (!isAuto) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var paths = isAuto ? getAllPaths(vm.router) : config.paths;
|
|
||||||
var len = paths.length;
|
|
||||||
var count = 0;
|
|
||||||
|
|
||||||
paths.forEach(function (path) {
|
|
||||||
if (INDEXS[path]) {
|
|
||||||
return count++
|
|
||||||
}
|
|
||||||
|
|
||||||
Docsify
|
|
||||||
.get(vm.router.getFile(path), false, vm.config.requestHeaders)
|
|
||||||
.then(function (result) {
|
|
||||||
INDEXS[path] = genIndex(path, result, vm.router, config.depth);
|
|
||||||
len === ++count && saveData(config.maxAge, expireKey, indexKey);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var NO_DATA_TEXT = '';
|
|
||||||
var options;
|
|
||||||
|
|
||||||
function style() {
|
|
||||||
var code = "\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n display: flex;\n align-items: center;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 0 7px;\n line-height: 36px;\n font-size: 14px;\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.search .clear-button {\n width: 36px;\n text-align: right;\n display: none;\n}\n\n.search .clear-button.show {\n display: block;\n}\n\n.search .clear-button svg {\n transform: scale(.5);\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}\n\n.app-name.hide, .sidebar-nav.hide {\n display: none;\n}";
|
|
||||||
|
|
||||||
Docsify.dom.style(code);
|
|
||||||
}
|
|
||||||
|
|
||||||
function tpl(defaultValue) {
|
|
||||||
if ( defaultValue === void 0 ) defaultValue = '';
|
|
||||||
|
|
||||||
var html =
|
|
||||||
"<div class=\"input-wrap\">\n <input type=\"search\" value=\"" + defaultValue + "\" />\n <div class=\"clear-button\">\n <svg width=\"26\" height=\"24\">\n <circle cx=\"12\" cy=\"12\" r=\"11\" fill=\"#ccc\" />\n <path stroke=\"white\" stroke-width=\"2\" d=\"M8.25,8.25,15.75,15.75\" />\n <path stroke=\"white\" stroke-width=\"2\"d=\"M8.25,15.75,15.75,8.25\" />\n </svg>\n </div>\n </div>\n <div class=\"results-panel\"></div>\n </div>";
|
|
||||||
var el = Docsify.dom.create('div', html);
|
|
||||||
var aside = Docsify.dom.find('aside');
|
|
||||||
|
|
||||||
Docsify.dom.toggleClass(el, 'search');
|
|
||||||
Docsify.dom.before(aside, el);
|
|
||||||
}
|
|
||||||
|
|
||||||
function doSearch(value) {
|
|
||||||
var $search = Docsify.dom.find('div.search');
|
|
||||||
var $panel = Docsify.dom.find($search, '.results-panel');
|
|
||||||
var $clearBtn = Docsify.dom.find($search, '.clear-button');
|
|
||||||
var $sidebarNav = Docsify.dom.find('.sidebar-nav');
|
|
||||||
var $appName = Docsify.dom.find('.app-name');
|
|
||||||
|
|
||||||
if (!value) {
|
|
||||||
$panel.classList.remove('show');
|
|
||||||
$clearBtn.classList.remove('show');
|
|
||||||
$panel.innerHTML = '';
|
|
||||||
|
|
||||||
if (options.hideOtherSidebarContent) {
|
|
||||||
$sidebarNav.classList.remove('hide');
|
|
||||||
$appName.classList.remove('hide');
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var matchs = search(value);
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
matchs.forEach(function (post) {
|
|
||||||
html += "<div class=\"matching-post\">\n<a href=\"" + (post.url) + "\">\n<h2>" + (post.title) + "</h2>\n<p>" + (post.content) + "</p>\n</a>\n</div>";
|
|
||||||
});
|
|
||||||
|
|
||||||
$panel.classList.add('show');
|
|
||||||
$clearBtn.classList.add('show');
|
|
||||||
$panel.innerHTML = html || ("<p class=\"empty\">" + NO_DATA_TEXT + "</p>");
|
|
||||||
if (options.hideOtherSidebarContent) {
|
|
||||||
$sidebarNav.classList.add('hide');
|
|
||||||
$appName.classList.add('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function bindEvents() {
|
|
||||||
var $search = Docsify.dom.find('div.search');
|
|
||||||
var $input = Docsify.dom.find($search, 'input');
|
|
||||||
var $inputWrap = Docsify.dom.find($search, '.input-wrap');
|
|
||||||
|
|
||||||
var timeId;
|
|
||||||
// Prevent to Fold sidebar
|
|
||||||
Docsify.dom.on(
|
|
||||||
$search,
|
|
||||||
'click',
|
|
||||||
function (e) { return e.target.tagName !== 'A' && e.stopPropagation(); }
|
|
||||||
);
|
|
||||||
Docsify.dom.on($input, 'input', function (e) {
|
|
||||||
clearTimeout(timeId);
|
|
||||||
timeId = setTimeout(function (_) { return doSearch(e.target.value.trim()); }, 100);
|
|
||||||
});
|
|
||||||
Docsify.dom.on($inputWrap, 'click', function (e) {
|
|
||||||
// Click input outside
|
|
||||||
if (e.target.tagName !== 'INPUT') {
|
|
||||||
$input.value = '';
|
|
||||||
doSearch();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatePlaceholder(text, path) {
|
|
||||||
var $input = Docsify.dom.getNode('.search input[type="search"]');
|
|
||||||
|
|
||||||
if (!$input) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (typeof text === 'string') {
|
|
||||||
$input.placeholder = text;
|
|
||||||
} else {
|
|
||||||
var match = Object.keys(text).filter(function (key) { return path.indexOf(key) > -1; })[0];
|
|
||||||
$input.placeholder = text[match];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateNoData(text, path) {
|
|
||||||
if (typeof text === 'string') {
|
|
||||||
NO_DATA_TEXT = text;
|
|
||||||
} else {
|
|
||||||
var match = Object.keys(text).filter(function (key) { return path.indexOf(key) > -1; })[0];
|
|
||||||
NO_DATA_TEXT = text[match];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateOptions(opts) {
|
|
||||||
options = opts;
|
|
||||||
}
|
|
||||||
|
|
||||||
function init(opts, vm) {
|
|
||||||
var keywords = vm.router.parse().query.s;
|
|
||||||
|
|
||||||
updateOptions(opts);
|
|
||||||
style();
|
|
||||||
tpl(keywords);
|
|
||||||
bindEvents();
|
|
||||||
keywords && setTimeout(function (_) { return doSearch(keywords); }, 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
function update(opts, vm) {
|
|
||||||
updateOptions(opts);
|
|
||||||
updatePlaceholder(opts.placeholder, vm.route.path);
|
|
||||||
updateNoData(opts.noData, vm.route.path);
|
|
||||||
}
|
|
||||||
|
|
||||||
var CONFIG = {
|
|
||||||
placeholder: 'Type to search',
|
|
||||||
noData: 'No Results!',
|
|
||||||
paths: 'auto',
|
|
||||||
depth: 2,
|
|
||||||
maxAge: 86400000, // 1 day
|
|
||||||
hideOtherSidebarContent: false,
|
|
||||||
namespace: undefined
|
|
||||||
};
|
|
||||||
|
|
||||||
var install = function (hook, vm) {
|
|
||||||
var util = Docsify.util;
|
|
||||||
var opts = vm.config.search || CONFIG;
|
|
||||||
|
|
||||||
if (Array.isArray(opts)) {
|
|
||||||
CONFIG.paths = opts;
|
|
||||||
} else if (typeof opts === 'object') {
|
|
||||||
CONFIG.paths = Array.isArray(opts.paths) ? opts.paths : 'auto';
|
|
||||||
CONFIG.maxAge = util.isPrimitive(opts.maxAge) ? opts.maxAge : CONFIG.maxAge;
|
|
||||||
CONFIG.placeholder = opts.placeholder || CONFIG.placeholder;
|
|
||||||
CONFIG.noData = opts.noData || CONFIG.noData;
|
|
||||||
CONFIG.depth = opts.depth || CONFIG.depth;
|
|
||||||
CONFIG.hideOtherSidebarContent = opts.hideOtherSidebarContent || CONFIG.hideOtherSidebarContent;
|
|
||||||
CONFIG.namespace = opts.namespace || CONFIG.namespace;
|
|
||||||
}
|
|
||||||
|
|
||||||
var isAuto = CONFIG.paths === 'auto';
|
|
||||||
|
|
||||||
hook.mounted(function (_) {
|
|
||||||
init(CONFIG, vm);
|
|
||||||
!isAuto && init$1(CONFIG, vm);
|
|
||||||
});
|
|
||||||
hook.doneEach(function (_) {
|
|
||||||
update(CONFIG, vm);
|
|
||||||
isAuto && init$1(CONFIG, vm);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$docsify.plugins = [].concat(install, $docsify.plugins);
|
|
||||||
|
|
||||||
}());
|
|
||||||
5
lib/plugins/search.min.js
vendored
5
lib/plugins/search.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue