Compare commits

..
19 Commits
Author SHA1 Message Date
anikethsaha 9e62be9d00 chore: add changelog 4.11.3 2020-03-25 14:27:53 +05:30
anikethsaha a2be53aea7 chore: updated dep and docs 2020-03-25 13:35:34 +05:30
anikethsaha ab597ca8e0 v4.11.3 2020-03-24 20:08:55 +05:30
anikethsaha 154abf59a6 fix: digit issue with sidebar (complete REVERT to old method) 2020-03-24 18:47:43 +05:30
AnixandGitHub f3a7929f07 chore: update issue template for bug 2020-03-23 21:23:51 +05:30
AnixandGitHub d08d1dd9bb Merge pull request #1073 from nisarhassan12/develop
Gitpod setup enhancements.
2020-03-19 00:12:36 +05:30
Nisar Hassan Naqvi 0eb9708225 [gitpod-setup] fix the preview opening issue. 2020-03-14 07:31:11 +00:00
Nisar Hassan Naqvi 378f151478 [gitpod-setup] remove the build command to make the server startup faster. 2020-03-14 05:13:21 +00:00
Nisar Hassan Naqvi 643850907c update Gitpod description in the Readme. 2020-03-14 05:11:43 +00:00
Nisar Hassan Naqvi b1acfe458c add gitpod Ready to Code badge in the Readme. 2020-03-14 05:06:45 +00:00
Nisar Hassan Naqvi d3ec14f06f [gitpod-setup] add VS Code extension for stylus support. 2020-03-14 05:01:23 +00:00
Nisar Hassan Naqvi 8d84bc8562 [gitpod-setup] expose port: 3000 and onOpen: open-preview. 2020-03-14 05:00:19 +00:00
AnixandGitHub bbcee36106 Merge pull request #1070 from anikethsaha/anikethsaha/gitpod-setup
Add gitpod config
2020-03-13 12:45:04 +05:30
Anix 184ff51774 Add gitpod config
this commit adds support for Gitpod.io, a free automated
dev environment that makes contributing and generally working on GitHub
projects much easier. It allows anyone to start a ready-to-code dev
environment for any branch, issue and pull request with a single click.
2020-03-13 07:12:17 +00:00
Anix b62a0c8f3e chore: add changelog 4.11.2 2020-03-09 21:15:00 +05:30
Anix a137d38416 [build] 4.11.2 2020-03-09 21:13:36 +05:30
Anix b4b1033f69 tests: fixed unit tests 2020-03-09 20:50:11 +05:30
Anix 9afa66607d chore: removed circular dep and css.escape 2020-03-09 20:33:07 +05:30
Anix 406670c3d6 fix: fixed rendering of color in coverpage issue 2020-03-09 20:30:01 +05:30
24 changed files with 99 additions and 53 deletions
+7
View File
@@ -7,6 +7,7 @@ about: Create a report to help us improve
<!-- Please use English language -->
<!-- Before creating an issue please make sure you are using the latest version of Docsify. -->
<!-- Please ask questions on StackOverflow: https://stackoverflow.com/questions/ask?tags=docsify -->
<!-- Please ask questions on gitter: https://gitter.im/docsifyjs/Lobby -->
## Bug Report
@@ -36,3 +37,9 @@ about: Create a report to help us improve
<!-- Love docsify? Please consider supporting our collective:
👉 https://opencollective.com/docsify/donate -->
#### Please create a reproducible sandbox
[![Edit 307qqv236](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/307qqv236)
#### Mention the docsify version in which this bug was not present (if any)
+10
View File
@@ -0,0 +1,10 @@
tasks:
- command: gp await-port 3000 && sleep 3 && gp preview $(gp url 3000)
- init: npm install
command: npm run dev
ports:
- port: 3000
onOpen: ignore
vscode:
extensions:
- sysoev.language-stylus@1.11.0:xX39oruAJ5UQzTNVRdbBaQ==
+18
View File
@@ -1,3 +1,21 @@
## [4.11.3](https://github.com/docsifyjs/docsify/compare/v4.11.2...v4.11.3) (2020-03-24)
### Bug Fixes
* fix: digit issue with sidebar (complete REVERT to old method) ([154abf5](https://github.com/docsifyjs/docsify/commit/154abf59a6153e84b018fcdffa86892776d6da7d))
## [4.11.2](https://github.com/docsifyjs/docsify/compare/v4.11.1...v4.11.2) (2020-03-09)
### Bug Fixes
* fixed rendering of color in coverpage issue ([406670c](https://github.com/docsifyjs/docsify/commit/406670c3d619a627142900fd45019fb8ce00f60a))
## [4.11.1](https://github.com/docsifyjs/docsify/compare/v4.11.0...v4.11.1) (2020-03-09)
+13
View File
@@ -18,6 +18,7 @@
<a href="https://www.npmjs.com/package/docsify"><img alt="npm" src="https://img.shields.io/npm/v/docsify.svg?style=flat-square"></a>
<a href="https://github.com/QingWei-Li/donate"><img alt="donate" src="https://img.shields.io/badge/%24-donate-ff69b4.svg?style=flat-square"></a>
<a href="https://gitter.im/docsifyjs/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><img alt="gitter" src="https://img.shields.io/gitter/room/docsifyjs/docsify.svg?style=flat-square"></a>
<a href="https://gitpod.io/#https://github.com/docsifyjs/docsify"><img src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod" alt="Gitpod Ready-to-Code"></a>
</p>
<p align="center">Gold Sponsor via <a href="https://opencollective.com/docsify">Open Collective</a></p>
@@ -69,6 +70,18 @@ Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
## Contributing
### Online one-click setup for Contributing
You can use Gitpod(A free online VS Code-like IDE) for contributing. With single click it'll launch a workspace and automatically:
- clone the docsify repo.
- install the dependencies.
- start `npm run dev`.
So that you can start straight away.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/docsifyjs/docsify)
- Fork it!
- Create your feature branch: `git checkout -b my-new-feature`
- Commit your changes: `git commit -am 'Add some feature'`
+1 -1
View File
@@ -1,6 +1,6 @@
![logo](_media/icon.svg)
# docsify <small>4.11.1</small>
# docsify <small>4.11.3</small>
> A magical documentation site generator.
+1 -7
View File
@@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "4.11.1",
"version": "4.11.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -3606,12 +3606,6 @@
"integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==",
"dev": true
},
"css.escape": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",
"integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=",
"dev": true
},
"cssesc": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz",
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "4.11.1",
"version": "4.11.3",
"description": "A magical documentation generator.",
"author": {
"name": "qingwei-li",
@@ -76,7 +76,6 @@
"conventional-changelog-cli": "^2.0.25",
"copy-dir": "^1.2.0",
"cross-env": "^6.0.3",
"css.escape": "^1.5.1",
"cssnano": "^4.1.10",
"cypress": "^3.8.1",
"cypress-image-snapshot": "^3.1.1",
+2 -2
View File
@@ -1,13 +1,13 @@
import { readFileSync } from 'fs';
import { resolve, basename } from 'path';
import resolvePathname from 'resolve-pathname';
import debug from 'debug';
import fetch from 'node-fetch';
import { AbstractHistory } from '../../src/core/router/history/abstract';
import { Compiler } from '../../src/core/render/compiler';
import { isAbsolutePath } from '../../src/core/router/util';
import * as tpl from '../../src/core/render/tpl';
import { prerenderEmbed } from '../../src/core/render/embed';
import fetch from 'node-fetch';
import debug from 'debug';
function cwd(...args) {
return resolve(process.cwd(), ...args);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "docsify-server-renderer",
"version": "4.11.1",
"version": "4.11.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1,6 +1,6 @@
{
"name": "docsify-server-renderer",
"version": "4.11.1",
"version": "4.11.2",
"description": "docsify server renderer",
"author": {
"name": "qingwei-li",
+1 -1
View File
@@ -1,7 +1,7 @@
import Tweezer from 'tweezer.js';
import { isMobile } from '../util/env';
import * as dom from '../util/dom';
import config from '../config';
import Tweezer from 'tweezer.js';
const nav = {};
let hoverOver = false;
+2 -2
View File
@@ -1,10 +1,10 @@
import marked from 'marked';
import prism from 'prismjs';
import * as util from './util';
import * as dom from './util/dom';
import { Compiler } from './render/compiler';
import { slugify } from './render/slugify';
import { get } from './fetch/ajax';
import prism from 'prismjs';
import marked from 'marked';
export default function() {
window.Docsify = {
+2 -22
View File
@@ -1,40 +1,20 @@
import marked from 'marked';
import { isAbsolutePath, getPath, getParentPath } from '../router/util';
import { isFn, merge, cached, isPrimitive } from '../util/core';
import { tree as treeTpl } from './tpl';
import { genTree } from './gen-tree';
import { slugify } from './slugify';
import { emojify } from './emojify';
import { getAndRemoveConfig } from './utils';
import { imageCompiler } from './compiler/image';
import { highlightCodeCompiler } from './compiler/code';
import { paragraphCompiler } from './compiler/paragraph';
import { taskListCompiler } from './compiler/taskList';
import { taskListItemCompiler } from './compiler/taskListItem';
import { linkCompiler } from './compiler/link';
import marked from 'marked';
const cachedLinks = {};
export function getAndRemoveConfig(str = '') {
const config = {};
if (str) {
str = str
.replace(/^'/, '')
.replace(/'$/, '')
.replace(/(?:^|\s):([\w-]+:?)=?([\w-]+)?/g, (m, key, value) => {
if (key.indexOf(':') === -1) {
config[key] = (value && value.replace(/&quot;/g, '')) || true;
return '';
}
return m;
})
.trim();
}
return { str, config };
}
const compileMedia = {
markdown(url) {
return {
+1 -1
View File
@@ -1,4 +1,4 @@
import { getAndRemoveConfig } from '../compiler';
import { getAndRemoveConfig } from '../utils';
import { slugify } from './slugify';
export const headingCompiler = ({ renderer, router, _self }) =>
+8 -4
View File
@@ -1,4 +1,4 @@
import { getAndRemoveConfig } from '../compiler';
import { getAndRemoveConfig } from '../utils';
import { isAbsolutePath, getPath, getParentPath } from '../../router/util';
export const imageCompiler = ({ renderer, contentBase, router }) =>
@@ -38,7 +38,11 @@ export const imageCompiler = ({ renderer, contentBase, router }) =>
url = getPath(contentBase, getParentPath(router.getCurrentPath()), href);
}
return `<img src="${url}" data-origin="${href}" alt="${text}" ${attrs.join(
' '
)} />`;
if (attrs.length > 0) {
return `<img src="${url}" data-origin="${href}" alt="${text}" ${attrs.join(
' '
)} />`;
}
return `<img src="${url}" data-origin="${href}" alt="${text}"${attrs}>`;
});
+1 -1
View File
@@ -1,4 +1,4 @@
import { getAndRemoveConfig } from '../compiler';
import { getAndRemoveConfig } from '../utils';
import { isAbsolutePath } from '../../router/util';
export const linkCompiler = ({ renderer, router, linkTarget, compilerClass }) =>
+1 -1
View File
@@ -1,6 +1,6 @@
import stripIndent from 'strip-indent';
import { get } from '../fetch/ajax';
import { merge } from '../util/core';
import stripIndent from 'strip-indent';
const cached = {};
+1 -1
View File
@@ -1,5 +1,4 @@
/* eslint-disable no-unused-vars */
import tinydate from 'tinydate';
import * as dom from '../util/dom';
import cssVars from '../util/polyfill/css-vars';
import { callHook } from '../init/lifecycle';
@@ -11,6 +10,7 @@ import { scrollActiveSidebar } from '../event/scroll';
import { Compiler } from './compiler';
import * as tpl from './tpl';
import { prerenderEmbed } from './embed';
import tinydate from 'tinydate';
function executeScript() {
const script = dom
+2 -1
View File
@@ -18,7 +18,8 @@ export function slugify(str) {
.replace(/<[^>\d]+>/g, '')
.replace(re, '')
.replace(/\s/g, '-')
.replace(/-+/g, '-');
.replace(/-+/g, '-')
.replace(/^(\d)/, '_$1');
let count = cache[slug];
count = hasOwn.call(cache, slug) ? count + 1 : 0;
+20
View File
@@ -0,0 +1,20 @@
export function getAndRemoveConfig(str = '') {
const config = {};
if (str) {
str = str
.replace(/^'/, '')
.replace(/'$/, '')
.replace(/(?:^|\s):([\w-]+:?)=?([\w-]+)?/g, (m, key, value) => {
if (key.indexOf(':') === -1) {
config[key] = (value && value.replace(/&quot;/g, '')) || true;
return '';
}
return m;
})
.trim();
}
return { str, config };
}
+1 -1
View File
@@ -1,8 +1,8 @@
import { supportsPushState } from '../util/env';
import * as dom from '../util/dom';
import { noop } from '../util/core';
import { HashHistory } from './history/hash';
import { HTML5History } from './history/html5';
import { noop } from '../util/core';
export function routerMixin(proto) {
proto.route = {};
+1 -1
View File
@@ -2,8 +2,8 @@
require = require('esm')(
module /* , options */
); /* eslint-disable-line no-global-assign */
const { expect } = require('chai');
const { History } = require('../../src/core/router/history/base');
const { expect } = require('chai');
class MockHistory extends History {
parse(path) {
+2 -2
View File
@@ -1,5 +1,5 @@
const { expect } = require('chai');
const { init, expectSameDom } = require('../_helper');
const { expect } = require('chai');
describe('render', function() {
it('important content (tips)', async function() {
@@ -107,7 +107,7 @@ text
expectSameDom(
output,
'<p><img src="http://imageUrl" data-origin="http://imageUrl" alt="alt text" /></p>'
'<p><img src="http://imageUrl" data-origin="http://imageUrl" alt="alt text"></p>'
);
});
+1 -1
View File
@@ -2,8 +2,8 @@
require = require('esm')(
module /* , options */
); /* eslint-disable-line no-global-assign */
const { expect } = require('chai');
const { resolvePath } = require('../../src/core/router/util');
const { expect } = require('chai');
describe('router/util', function() {
it('resolvePath', async function() {