mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Merge branch 'master' into feature/clipboard-js-integration
This commit is contained in:
commit
13cd1d1a26
@ -1,3 +1,7 @@
|
||||
mkdocs-material-1.6.4 (2017-05-24)
|
||||
|
||||
* Fixed #337: JavaScript error for GitHub organization URLs
|
||||
|
||||
mkdocs-material-1.6.3 (2017-05-16)
|
||||
|
||||
* Fixed #329: Broken source stats for private or unknown GitHub repos
|
||||
|
@ -360,6 +360,11 @@ extra:
|
||||
A new entry at the bottom of the table of contents is generated that is linking
|
||||
to the comments section. The necessary JavaScript is automatically included.
|
||||
|
||||
!!! warning "Requirements"
|
||||
|
||||
`site_url` value must be set in `mkdocs.yml` for the Discus integration to
|
||||
load properly.
|
||||
|
||||
[17]: https://disqus.com
|
||||
|
||||
### Localization
|
||||
|
@ -12,11 +12,17 @@ To determine the currently installed version, use the following command:
|
||||
|
||||
``` sh
|
||||
pip show mkdocs-material | grep -E ^Version
|
||||
# Version 1.6.3
|
||||
# Version 1.6.4
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
### 1.6.4 <small> _ May 24, 2017</small>
|
||||
|
||||
* Fixed [#337][337]: JavaScript error for GitHub organization URLs
|
||||
|
||||
[337]: https://github.com/squidfunk/mkdocs-material/issues/337
|
||||
|
||||
### 1.6.3 <small> _ May 16, 2017</small>
|
||||
|
||||
* Fixed [#329][329]: Broken source stats for private or unknown GitHub repos
|
||||
|
File diff suppressed because one or more lines are too long
@ -23,7 +23,7 @@
|
||||
{% else %}
|
||||
<link rel="shortcut icon" href="{{ base_url }}/assets/images/favicon.png">
|
||||
{% endif %}
|
||||
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-1.6.3">
|
||||
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-1.6.4">
|
||||
{% endblock %}
|
||||
{% block htmltitle %}
|
||||
{% if page and page.meta.title %}
|
||||
@ -149,7 +149,7 @@
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block scripts %}
|
||||
<script src="{{ base_url }}/assets/javascripts/application-1a4408fe3b.js"></script>
|
||||
<script src="{{ base_url }}/assets/javascripts/application-3f3f3473e5.js"></script>
|
||||
<script>app.initialize({url:{base:"{{ base_url }}"}})</script>
|
||||
{% for path in extra_javascript %}
|
||||
<script src="{{ path }}"></script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mkdocs-material",
|
||||
"version": "1.6.3",
|
||||
"version": "1.6.4",
|
||||
"description": "A Material Design theme for MkDocs",
|
||||
"keywords": [
|
||||
"mkdocs",
|
||||
@ -76,7 +76,7 @@
|
||||
"gulp-sourcemaps": "^2.4.0",
|
||||
"gulp-stylelint": "^3.7.0",
|
||||
"gulp-svgmin": "^1.2.3",
|
||||
"gulp-uglify": "^2.0.0",
|
||||
"gulp-uglify": "^3.0.0",
|
||||
"gulp-util": "^3.0.8",
|
||||
"js-cookie": "^2.1.3",
|
||||
"lunr": "^2.0.2",
|
||||
|
@ -43,7 +43,6 @@ export default class Abstract {
|
||||
const ref = (typeof el === "string")
|
||||
? document.querySelector(el)
|
||||
: el
|
||||
|
||||
if (!(ref instanceof HTMLAnchorElement))
|
||||
throw new ReferenceError
|
||||
this.el_ = ref
|
||||
|
@ -40,14 +40,17 @@ export default class GitHub extends Abstract {
|
||||
constructor(el) {
|
||||
super(el)
|
||||
|
||||
/* Extract user and repository name from URL, as we have to query for all
|
||||
/* Extract user (and repository name) from URL, as we have to query for all
|
||||
repositories, to omit 404 errors for private repositories */
|
||||
const [, user, name] = /^.+github\.com\/([^\/]+)\/([^\/]+).*$/
|
||||
const matches = /^.+github\.com\/([^\/]+)\/?([^\/]+)?.*$/
|
||||
.exec(this.base_)
|
||||
if (matches && matches.length === 3) {
|
||||
const [, user, name] = matches
|
||||
|
||||
/* Initialize base URL and repository name */
|
||||
this.base_ = `https://api.github.com/users/${user}/repos`
|
||||
this.name_ = name
|
||||
/* Initialize base URL and repository name */
|
||||
this.base_ = `https://api.github.com/users/${user}/repos`
|
||||
this.name_ = name
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -59,13 +62,25 @@ export default class GitHub extends Abstract {
|
||||
return fetch(this.base_)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const repo = data.find(item => item.name === this.name_)
|
||||
return repo
|
||||
? [
|
||||
`${this.format_(repo.stargazers_count)} Stars`,
|
||||
`${this.format_(repo.forks_count)} Forks`
|
||||
if (!(data instanceof Array))
|
||||
throw new TypeError
|
||||
|
||||
/* Display number of stars and forks, if repository is given */
|
||||
if (this.name_) {
|
||||
const repo = data.find(item => item.name === this.name_)
|
||||
return repo
|
||||
? [
|
||||
`${this.format_(repo.stargazers_count)} Stars`,
|
||||
`${this.format_(repo.forks_count)} Forks`
|
||||
]
|
||||
: []
|
||||
|
||||
/* Display number of repositories, otherwise */
|
||||
} else {
|
||||
return [
|
||||
`${data.length} Repositories`
|
||||
]
|
||||
: []
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
28
yarn.lock
28
yarn.lock
@ -1128,7 +1128,7 @@ combined-stream@^1.0.5, combined-stream@~1.0.5:
|
||||
dependencies:
|
||||
delayed-stream "~1.0.0"
|
||||
|
||||
commander@2.9.x, commander@^2.9.0:
|
||||
commander@2.9.x, commander@^2.9.0, commander@~2.9.0:
|
||||
version "2.9.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
|
||||
dependencies:
|
||||
@ -1565,11 +1565,7 @@ ecc-jsbn@~0.1.1:
|
||||
dependencies:
|
||||
jsbn "~0.1.0"
|
||||
|
||||
electron-to-chromium@^1.2.3:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.4.tgz#9751cbea89fa120bf88c226ba41eb8d0b6f1b597"
|
||||
|
||||
electron-to-chromium@^1.3.9:
|
||||
electron-to-chromium@^1.2.3, electron-to-chromium@^1.3.9:
|
||||
version "1.3.10"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.10.tgz#63d62b785471f0d8dda85199d64579de8a449f08"
|
||||
|
||||
@ -2454,17 +2450,16 @@ gulp-svgmin@^1.2.3:
|
||||
gulp-util "^3.0.4"
|
||||
svgo "^0.7.0"
|
||||
|
||||
gulp-uglify@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-2.0.1.tgz#e8cfb831014fc9ff2e055e33785861830d499365"
|
||||
gulp-uglify@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-3.0.0.tgz#0df0331d72a0d302e3e37e109485dddf33c6d1ca"
|
||||
dependencies:
|
||||
gulplog "^1.0.0"
|
||||
has-gulplog "^0.1.0"
|
||||
lodash "^4.13.1"
|
||||
make-error-cause "^1.1.1"
|
||||
through2 "^2.0.0"
|
||||
uglify-js "2.7.5"
|
||||
uglify-save-license "^0.4.1"
|
||||
uglify-js "^3.0.5"
|
||||
vinyl-sourcemaps-apply "^0.2.0"
|
||||
|
||||
gulp-util@^3, gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.4, gulp-util@^3.0.6, gulp-util@^3.0.7, gulp-util@^3.0.8, gulp-util@~3.0.0:
|
||||
@ -5444,7 +5439,7 @@ typedarray@^0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
|
||||
uglify-js@2.7.5, uglify-js@2.7.x, uglify-js@^2.7.5, uglify-js@~2.7.3:
|
||||
uglify-js@2.7.x, uglify-js@^2.7.5, uglify-js@~2.7.3:
|
||||
version "2.7.5"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8"
|
||||
dependencies:
|
||||
@ -5453,9 +5448,12 @@ uglify-js@2.7.5, uglify-js@2.7.x, uglify-js@^2.7.5, uglify-js@~2.7.3:
|
||||
uglify-to-browserify "~1.0.0"
|
||||
yargs "~3.10.0"
|
||||
|
||||
uglify-save-license@^0.4.1:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1"
|
||||
uglify-js@^3.0.5:
|
||||
version "3.0.11"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.11.tgz#81f594b9a24dad76e39da92f8f06e5b3bc8c2e11"
|
||||
dependencies:
|
||||
commander "~2.9.0"
|
||||
source-map "~0.5.1"
|
||||
|
||||
uglify-to-browserify@~1.0.0:
|
||||
version "1.0.2"
|
||||
|
Loading…
Reference in New Issue
Block a user