From 356b937d443f9f74bec7c08f8aaef81c32436f95 Mon Sep 17 00:00:00 2001 From: Sina Nedadahandeh Date: Wed, 4 Jan 2017 18:31:41 -0800 Subject: [PATCH 001/881] Clean up readme (#48) * Readme/homepage cleanup * Readme cleanup --- docs/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/README.md b/docs/README.md index 405495b..3a6d0df 100644 --- a/docs/README.md +++ b/docs/README.md @@ -98,7 +98,7 @@ Code in `index.html` ### Cover Page -Generate a cover page through with markdown. Create a `_coverpage.md` and set `data-coverpage` in script tag. +Generate a cover page with markdown. Create a `_coverpage.md` and set `data-coverpage` in the script tag. ```markdown ![logo](_media/icon.svg) @@ -117,7 +117,7 @@ Generate a cover page through with markdown. Create a `_coverpage.md` and set `d ``` #### Custom background -Currently the background of cover page is generated randomly. We can customize the background, just using the syntax to add image. +Currently the background of the cover page is generated randomly. We can customize the background color, or add a background image. ```markdown # docsify 1.2.0 @@ -135,7 +135,7 @@ Currently the background of cover page is generated randomly. We can customize t ### Markdown parser -Docsify uses [marked](https://github.com/chjj/marked) to parse markdown, we can configure it +Docsify uses [marked](https://github.com/chjj/marked) to parse markdown. We can configure it ```js window.$docsify = { @@ -145,7 +145,7 @@ window.$docsify = { } ``` -And can even be completely customized +And it can even be customized ```js window.$docsify = { @@ -159,7 +159,7 @@ window.$docsify = { ## Options -You can add configuration by script tag attributes or `window.$docsify`. +You can add configurations in the script tag attributes or with `window.$docsify`. ### repo Display the [GitHub Corner](http://tholman.com/github-corners/) widget. @@ -247,7 +247,7 @@ window.$docsify = { ### load-sidebar -Load sidebar markdown file. If it is configured, load the current directory `_sidebar.md` by default. If the file isn't exist, sidebar will appear as a TOC. +Load sidebar markdown file. If it is configured, load the current directory `_sidebar.md` by default. If the file doesn't exist, the sidebar will appear as a TOC. ** you should add `.nojekyll` into docs folder to prevent GitHub Pages from ignoring the `_sidebar.md`** ```html From 847cf3b656e91e519abacb86826989aee52720aa Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Thu, 5 Jan 2017 10:33:48 +0800 Subject: [PATCH 002/881] Update readme --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 3a6d0df..a670fec 100644 --- a/docs/README.md +++ b/docs/README.md @@ -33,7 +33,7 @@ Create `README.md` as the main page ``` ### Deploy! -Push and open the **GitHub Pages** feature +Push code and activate **GitHub Pages** via your repo's settings ![image](https://cloud.githubusercontent.com/assets/7565692/20639058/e65e6d22-b3f3-11e6-9b8b-6309c89826f2.png) ## CLI From 114955558e02699f8970d2be02998c10411f3389 Mon Sep 17 00:00:00 2001 From: "cinwell.li" Date: Mon, 9 Jan 2017 17:47:38 +0800 Subject: [PATCH 003/881] Remove HTML tag when handling slug, fixed #49 (#50) * Remove HTML tag when handling slug, fixed #49 * Fix slugify --- CHANGELOG.md | 4 ++++ src/util.js | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c83b2a..1082f9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.5.1 +### Bug fixes +- Remove HTML tag when handling slug + ## 1.5.0 ### Bug fixes diff --git a/src/util.js b/src/util.js index daf4867..fd618aa 100644 --- a/src/util.js +++ b/src/util.js @@ -117,6 +117,7 @@ export function slugify (string) { if (!maintainCase) string = string.toLowerCase() let slug = string.trim() + .replace(/<[^>\d]+>/g, '') .replace(re, '') .replace(/\s/g, replacement) let occurrences = slugify.occurrences[slug] From 1c935b2fd70e82de9a8e4780d9b5ec4c1b1e6dcb Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Mon, 9 Jan 2017 17:50:43 +0800 Subject: [PATCH 004/881] bump 1.5.1 --- docs/_coverpage.md | 2 +- lib/docsify.js | 1 + lib/docsify.min.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/_coverpage.md b/docs/_coverpage.md index f97f329..ba504d4 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -1,6 +1,6 @@ ![logo](_media/icon.svg) -# docsify 1.5.0 +# docsify 1.5.1 > A magical documentation site generator. diff --git a/lib/docsify.js b/lib/docsify.js index 1fed88d..6603bfa 100644 --- a/lib/docsify.js +++ b/lib/docsify.js @@ -125,6 +125,7 @@ function slugify (string) { if (!maintainCase) { string = string.toLowerCase(); } var slug = string.trim() + .replace(/<[^>\d]+>/g, '') .replace(re, '') .replace(/\s/g, replacement); var occurrences = slugify.occurrences[slug]; diff --git a/lib/docsify.min.js b/lib/docsify.min.js index be8a37f..427c1a4 100644 --- a/lib/docsify.min.js +++ b/lib/docsify.min.js @@ -1,2 +1,2 @@ -var Docsify=function(){"use strict";function e(e,t,n){void 0===t&&(t="GET");var r=new XMLHttpRequest;return r.open(t,e),r.send(),{then:function(e,t){if(void 0===t&&(t=function(){}),n){var a=setInterval(function(e){return n({step:Math.floor(5*Math.random()+1)})},500);r.addEventListener("progress",n),r.addEventListener("loadend",function(e){n(e),clearInterval(a)})}r.addEventListener("error",t),r.addEventListener("load",function(n){var r=n.target;r.status>=400?t(r):e(r.response)})},abort:function(){return 4!==r.readyState&&r.abort()}}}function t(e,t){var n=[],r={};return e.forEach(function(e){var a=e.level||1,i=a-1;a>t||(r[i]?(r[i].children=r[i].children||[],r[i].children.push(e)):n.push(e),r[a]=e)}),n}function n(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function r(e){return null===e||void 0===e}function a(){var e=window.location;if($===e.hash&&!r(A))return A;var t=e.hash.match(/^#\/([^#]+)/);return t=t&&2===t.length?t[1]:/^#\//.test(e.hash)?"":e.pathname,A=t,$=e.hash,t}function i(){return document.body.clientWidth<=600}function s(e){var t=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,.\/:;<=>?@\[\]^`{|}~]/g,n=!1,r="-";if(s.occurrences=s.occurrences||{},"string"!=typeof e)return"";n||(e=e.toLowerCase());var a=e.trim().replace(t,"").replace(/\s/g,r),i=s.occurrences[a];return s.occurrences.hasOwnProperty(a)?i++:i=0,s.occurrences[a]=i,i&&(a=a+"-"+i),a}function o(){function e(){for(var e=0,r=t.length;e10){var o=n[i.getAttribute("data-id")];if(!o||o===a)return;return a&&a.setAttribute("class",""),o.setAttribute("class","active"),void(a=o)}}}if(!i()){for(var t=document.querySelectorAll(".anchor"),n={},r=document.querySelectorAll(".sidebar li"),a=null,s=0,o=r.length;s=t||e.classList.contains("hidden")?document.body.classList.add("sticky"):document.body.classList.remove("sticky")}()}function g(e,t){return t={exports:{}},e(t,t.exports),t.exports}function h(e){return e?(/\/\//.test(e)||(e="https://github.com/"+e),e=e.replace(/^git\+/,""),'\n \n \n '):""}function f(e){var t=e+'';return(i()?t+"
":"
"+t)+'
\n
\n
\n
'}function m(){var e=", 100%, 85%",t="linear-gradient(to left bottom, hsl("+(Math.floor(255*Math.random())+e)+") 0%, hsl("+(Math.floor(255*Math.random())+e)+") 100%)";return'
\n
\n
\n
'}function b(){return''}function y(e,t){return void 0===t&&(t=""),e&&e.length?(e.forEach(function(e){t+='
  • '+e.title+"
  • ",e.children&&(t+='
    • '+y(e.children)+"
    ")}),t):""}function v(e){M=e;var t=new O.Renderer;t.heading=function(e,t){var n=s(e),r="";return M.router&&(r="#/"+a()),P.push({level:t,slug:r+"#"+encodeURIComponent(n),title:e}),"'+e+""},t.code=function(e,t){void 0===t&&(t="");var n=T.highlight(e,T.languages[t]||T.languages.markup).replace(/{{/g,"{{");return'
    '+n+"
    "},t.link=function(e,t,n){return M.router&&!/:/.test(e)&&(e=("#/"+e).replace(/\/\//g,"/")),''+n+""},"function"==typeof M.markdown?(N.setOptions({renderer:t}),N=M.markdown.call(this,N)):N.setOptions(q({renderer:t},M.markdown))}function k(e,t){var n=document.querySelector("nav")||document.createElement("nav");M.repo||n.classList.add("no-badge"),e[t?"outerHTML":"innerHTML"]=h(M.repo)+(M.coverpage?m():"")+f(M.sidebarToggle?b():""),document.body.insertBefore(n,document.body.children[0]),c("button.sidebar-toggle"),M.coverpage?!i()&&window.addEventListener("scroll",d):document.body.classList.add("sticky")}function x(e){if(W("article",e?N(e):"not found"),M.sidebar||M.loadSidebar||S(),e&&"undefined"!=typeof Vue&&"undefined"!=typeof Vuep){var t=new Vue({el:"main"});t.$nextTick(function(e){return o()})}M.auto2top&&p()}function w(e){I.navbar&&I.navbar===e||(I.navbar=e,e&&W("nav",N(e)),u("nav"))}function S(e){var n;n=e?N(e):M.sidebar?y(M.sidebar,"