Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub organization URL in `repo_url` generate Javascript error #337

kcgthb opened this issue May 19, 2017 · 4 comments

GitHub organization URL in `repo_url` generate Javascript error #337

kcgthb opened this issue May 19, 2017 · 4 comments


Copy link

@kcgthb kcgthb commented May 19, 2017


I'm not 100% sure if that one is on MkDocs or MkDocs-Material side, but when using a GitHub organization URL for repo_url in mkdocs.yml (such as instead of the regular project URL (, the following JavaScript exception is generated:

application-6b4ff16fa7.js:3 Uncaught TypeError: Invalid attempt to destructure non-iterable instance
    at application-6b4ff16fa7.js:3
    at new t (application-6b4ff16fa7.js:3)
    at application-6b4ff16fa7.js:1
    at Object.r (application-6b4ff16fa7.js:1)
    at (index):662

Expected behavior

No javascript error

Actual behavior

JS exception

Steps to reproduce the bug

  1. Clone the mkdocs-material repo
  2. edit mkdocs.yml and replace the repo_url value by
  3. yarn run start and look at the browser console

Package versions

  • Python: python --version: Python 2.7.13
  • MkDocs: mkdocs --version: mkdocs, version 0.16.3
  • Material: pip show mkdocs-material | grep -E ^Version: master

Project configuration

System information

  • OS: Debian 9.0
  • Browser: Chrome 58
Copy link

@squidfunk squidfunk commented May 20, 2017

Well, I haven't anticipated that people would link their accounts/organizations but it seems reasonable. When doing this, no stars can be loaded, so we'll just display nothing under the name of the organization I would say.

@squidfunk squidfunk self-assigned this May 20, 2017
@squidfunk squidfunk added the bug label May 20, 2017
Copy link
Contributor Author

@kcgthb kcgthb commented May 20, 2017

Indeed, I think it's fine to not display any star in that case, just the link to the GitHub organization page.

To give some more context about my use case: I generate documentation from a private repo, but would still use the "edit on GitHub" link feature so authorized users could edit pages with a simple click. That means I need both edit_uri and repo_url defined. But since the repo is a private one, linking to it on each page doesn't seem very useful to me. So my plan is to have:

  • repo_url set to
  • edit_uri set to reponame/path/to/docs

Thanks for looking into it!

Copy link

@squidfunk squidfunk commented May 24, 2017

Fixed in #342 - I decided to show the number of repositories for user and organization links, so now it reads "11 Repositories" under the name of the repo. Will be released with 1.6.4 shortly.

@squidfunk squidfunk closed this May 24, 2017
Copy link
Contributor Author

@kcgthb kcgthb commented May 24, 2017

Very nice, thank you @squidfunk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.