|
1 | 1 | <!DOCTYPE html>
|
2 | 2 | <html lang="en">
|
| 3 | + <head> |
| 4 | + <meta charset="UTF-8" /> |
| 5 | + <title>docsify</title> |
| 6 | + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
| 7 | + <meta name="viewport" content="width=device-width,initial-scale=1" /> |
| 8 | + <link rel="stylesheet" href="/themes/vue.css" title="vue" /> |
| 9 | + <link rel="stylesheet" href="/themes/dark.css" title="dark" disabled /> |
| 10 | + <link rel="stylesheet" href="/themes/buble.css" title="buble" disabled /> |
| 11 | + <link rel="stylesheet" href="/themes/pure.css" title="pure" disabled /> |
| 12 | + <script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1.0.1/index.min.js"></script> |
| 13 | + <style> |
| 14 | + nav.app-nav li ul { |
| 15 | + min-width: 100px; |
| 16 | + } |
3 | 17 |
|
4 |
| -<head> |
5 |
| - <meta charset="UTF-8"> |
6 |
| - <title>docsify</title> |
7 |
| - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
8 |
| - <meta name="viewport" content="width=device-width,initial-scale=1"> |
9 |
| - <link rel="stylesheet" href="/themes/vue.css" title="vue"> |
10 |
| - <link rel="stylesheet" href="/themes/dark.css" title="dark" disabled> |
11 |
| - <link rel="stylesheet" href="/themes/buble.css" title="buble" disabled> |
12 |
| - <link rel="stylesheet" href="/themes/pure.css" title="pure" disabled> |
13 |
| - <script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1.0.1/index.min.js"></script> |
14 |
| - <style> |
15 |
| - nav.app-nav li ul { |
16 |
| - min-width: 100px; |
17 |
| - } |
| 18 | + #carbonads { |
| 19 | + box-shadow: none !important; |
| 20 | + width: auto !important; |
| 21 | + } |
| 22 | + </style> |
| 23 | + </head> |
18 | 24 |
|
19 |
| - #carbonads { |
20 |
| - box-shadow: none !important; |
21 |
| - width: auto !important; |
22 |
| - } |
23 |
| - </style> |
24 |
| -</head> |
| 25 | + <body> |
| 26 | + <div id="app"></div> |
| 27 | + <script> |
| 28 | + // Set html "lang" attribute based on URL |
| 29 | + var lang = location.hash.match(/#\/(de-de|es|ru-ru|zh-cn)\//); |
25 | 30 |
|
26 |
| -<body> |
27 |
| - <div id="app"></div> |
28 |
| - <script> |
29 |
| - window.$docsify = { |
30 |
| - alias: { |
31 |
| - '.*?/awesome': 'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md', |
32 |
| - '.*?/changelog': 'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md', |
33 |
| - '/.*/_navbar.md': '/_navbar.md', |
34 |
| - '/zh-cn/(.*)': 'https://cdn.jsdelivr.net/gh/docsifyjs/docs-zh@master/$1', |
35 |
| - '/de-de/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1', |
36 |
| - '/ru-ru/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1', |
37 |
| - '/es/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1', |
38 |
| - '/write-a-plugin': 'https://raw.githubusercontent.com/docsifyjs/docsify/master/docs/write-a-plugin.md' |
39 |
| - }, |
40 |
| - auto2top: true, |
41 |
| - basePath: '/docs/', |
42 |
| - coverpage: true, |
43 |
| - executeScript: true, |
44 |
| - loadSidebar: true, |
45 |
| - loadNavbar: true, |
46 |
| - mergeNavbar: true, |
47 |
| - maxLevel: 4, |
48 |
| - subMaxLevel: 2, |
49 |
| - name: 'docsify', |
50 |
| - search: { |
51 |
| - noData: { |
52 |
| - '/de-de/': 'Keine Ergebnisse!', |
53 |
| - '/zh-cn/': '没有结果!', |
54 |
| - '/': 'No results!' |
55 |
| - }, |
56 |
| - paths: 'auto', |
57 |
| - placeholder: { |
58 |
| - '/de-de/': 'Suche', |
59 |
| - '/zh-cn/': '搜索', |
60 |
| - '/': 'Search' |
| 31 | + if (lang) { |
| 32 | + document.documentElement.setAttribute('lang', lang[1]); |
| 33 | + } |
| 34 | + |
| 35 | + // Docsify configuration |
| 36 | + window.$docsify = { |
| 37 | + alias: { |
| 38 | + '.*?/awesome': |
| 39 | + 'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md', |
| 40 | + '.*?/changelog': |
| 41 | + 'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md', |
| 42 | + '/.*/_navbar.md': '/_navbar.md', |
| 43 | + '/es/(.*)': |
| 44 | + 'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1', |
| 45 | + '/de-de/(.*)': |
| 46 | + 'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1', |
| 47 | + '/ru-ru/(.*)': |
| 48 | + 'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1', |
| 49 | + '/zh-cn/(.*)': |
| 50 | + 'https://cdn.jsdelivr.net/gh/docsifyjs/docs-zh@master/$1', |
61 | 51 | },
|
62 |
| - pathNamespaces: ['/zh-cn', '/de-de', '/ru-ru', '/es'] |
63 |
| - }, |
64 |
| - plugins: [ |
65 |
| - DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'), |
66 |
| - function (hook, vm) { |
67 |
| - hook.beforeEach(function (html) { |
68 |
| - if (/githubusercontent\.com/.test(vm.route.file)) { |
69 |
| - url = vm.route.file |
70 |
| - .replace('raw.githubusercontent.com', 'github.com') |
71 |
| - .replace(/\/master/, '/blob/master') |
72 |
| - } else if (/jsdelivr\.net/.test(vm.route.file)) { |
73 |
| - url = vm.route.file |
74 |
| - .replace('cdn.jsdelivr.net/gh', 'github.com') |
75 |
| - .replace('@master', '/blob/master') |
76 |
| - } else { |
77 |
| - url = 'https://github.com/docsifyjs/docsify/blob/master/docs/' + vm.route.file |
78 |
| - } |
79 |
| - var editHtml = '[:memo: Edit Document](' + url + ')\n' |
80 |
| - return editHtml |
81 |
| - + html |
82 |
| - + '\n\n----\n\n' |
83 |
| - + '<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>' |
84 |
| - }) |
| 52 | + auto2top: true, |
| 53 | + basePath: '/docs/', |
| 54 | + coverpage: true, |
| 55 | + executeScript: true, |
| 56 | + loadSidebar: true, |
| 57 | + loadNavbar: true, |
| 58 | + mergeNavbar: true, |
| 59 | + maxLevel: 4, |
| 60 | + subMaxLevel: 2, |
| 61 | + name: 'docsify', |
| 62 | + search: { |
| 63 | + noData: { |
| 64 | + '/es/': '¡No hay resultados!', |
| 65 | + '/de-de/': 'Keine Ergebnisse!', |
| 66 | + '/ru-ru/': 'Никаких результатов!', |
| 67 | + '/zh-cn/': '没有结果!', |
| 68 | + '/': 'No results!', |
| 69 | + }, |
| 70 | + paths: 'auto', |
| 71 | + placeholder: { |
| 72 | + '/es/': 'Buscar', |
| 73 | + '/de-de/': 'Suche', |
| 74 | + '/ru-ru/': 'Поиск', |
| 75 | + '/zh-cn/': '搜索', |
| 76 | + '/': 'Search', |
| 77 | + }, |
| 78 | + pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'] |
85 | 79 | },
|
86 |
| - ] |
87 |
| - } |
88 |
| - </script> |
89 |
| - <script src="/lib/docsify.js"></script> |
90 |
| - <script src="/lib/plugins/search.js"></script> |
91 |
| - <script src="/lib/plugins/emoji.js"></script> |
92 |
| - <script src="/lib/plugins/front-matter.js"></script> |
93 |
| - <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js"></script> |
94 |
| - <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-markdown.min.js"></script> |
95 |
| - <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-nginx.min.js"></script> |
96 |
| - <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-php.min.js"></script> |
97 |
| -</body> |
98 |
| - |
| 80 | + plugins: [ |
| 81 | + DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'), |
| 82 | + function(hook, vm) { |
| 83 | + hook.beforeEach(function(html) { |
| 84 | + if (/githubusercontent\.com/.test(vm.route.file)) { |
| 85 | + url = vm.route.file |
| 86 | + .replace('raw.githubusercontent.com', 'github.com') |
| 87 | + .replace(/\/master/, '/blob/master'); |
| 88 | + } else if (/jsdelivr\.net/.test(vm.route.file)) { |
| 89 | + url = vm.route.file |
| 90 | + .replace('cdn.jsdelivr.net/gh', 'github.com') |
| 91 | + .replace('@master', '/blob/master'); |
| 92 | + } else { |
| 93 | + url = |
| 94 | + 'https://github.com/docsifyjs/docsify/blob/master/docs/' + |
| 95 | + vm.route.file; |
| 96 | + } |
| 97 | + var editHtml = '[:memo: Edit Document](' + url + ')\n'; |
| 98 | + return ( |
| 99 | + editHtml + |
| 100 | + html + |
| 101 | + '\n\n----\n\n' + |
| 102 | + '<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>' |
| 103 | + ); |
| 104 | + }); |
| 105 | + }, |
| 106 | + ], |
| 107 | + }; |
| 108 | + </script> |
| 109 | + <script src="/lib/docsify.js"></script> |
| 110 | + <script src="/lib/plugins/search.js"></script> |
| 111 | + <script src="/lib/plugins/emoji.js"></script> |
| 112 | + <script src="/lib/plugins/front-matter.js"></script> |
| 113 | + <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js"></script> |
| 114 | + <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-markdown.min.js"></script> |
| 115 | + <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-nginx.min.js"></script> |
| 116 | + <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-php.min.js"></script> |
| 117 | + </body> |
99 | 118 | </html>
|
0 commit comments