mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed source integrations after refactoring
This commit is contained in:
parent
c7ddada630
commit
baeb4cc5bd
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
material/assets/javascripts/bundle.9db80570.min.js.map
Normal file
1
material/assets/javascripts/bundle.9db80570.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.4fb8c892.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.4fb8c892.min.js.map",
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.9db80570.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.9db80570.min.js.map",
|
||||
"assets/javascripts/vendor.js": "assets/javascripts/vendor.e3b5b4d0.min.js",
|
||||
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.e3b5b4d0.min.js.map",
|
||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.2693be28.min.js",
|
||||
|
@ -173,7 +173,7 @@
|
||||
</div>
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/vendor.e3b5b4d0.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.4fb8c892.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.9db80570.min.js' | url }}"></script>
|
||||
{%- set translations = {} -%}
|
||||
{%- for key in [
|
||||
"clipboard.copy",
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
import { Repo, User } from "github-types"
|
||||
import { Observable, from } from "rxjs"
|
||||
import { filter, map } from "rxjs/operators"
|
||||
import { map } from "rxjs/operators"
|
||||
|
||||
import { round } from "utilities"
|
||||
|
||||
@ -48,12 +48,11 @@ export function fetchSourceFactsFromGitHub(
|
||||
: `https://api.github.com/users/${user}`
|
||||
return from(fetch(url).then(res => res.json()))
|
||||
.pipe(
|
||||
filter(({ status }) => status === 200),
|
||||
map(({ response }) => {
|
||||
map(data => {
|
||||
|
||||
/* GitHub repository */
|
||||
if (typeof repo !== "undefined") {
|
||||
const { stargazers_count, forks_count }: Repo = response
|
||||
const { stargazers_count, forks_count }: Repo = data
|
||||
return [
|
||||
`${round(stargazers_count || 0)} Stars`,
|
||||
`${round(forks_count || 0)} Forks`
|
||||
@ -61,7 +60,7 @@ export function fetchSourceFactsFromGitHub(
|
||||
|
||||
/* GitHub user/organization */
|
||||
} else {
|
||||
const { public_repos }: User = response
|
||||
const { public_repos }: User = data
|
||||
return [
|
||||
`${round(public_repos || 0)} Repositories`
|
||||
]
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
import { ProjectSchema } from "gitlab"
|
||||
import { Observable, from } from "rxjs"
|
||||
import { filter, map } from "rxjs/operators"
|
||||
import { map } from "rxjs/operators"
|
||||
|
||||
import { round } from "utilities"
|
||||
|
||||
@ -46,8 +46,6 @@ export function fetchSourceFactsFromGitLab(
|
||||
const url = `https://${base}/api/v4/projects/${encodeURIComponent(project)}`
|
||||
return from(fetch(url).then(res => res.json()))
|
||||
.pipe(
|
||||
filter(({ status }) => status === 200),
|
||||
map(({ response }) => response),
|
||||
map(({ star_count, forks_count }: ProjectSchema) => ([
|
||||
`${round(star_count)} Stars`,
|
||||
`${round(forks_count)} Forks`
|
||||
|
Loading…
Reference in New Issue
Block a user