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

Gitlab/Github/Bitbucket Source detection #57

Closed
brendo opened this issue Oct 12, 2016 · 4 comments
Closed

Gitlab/Github/Bitbucket Source detection #57

brendo opened this issue Oct 12, 2016 · 4 comments
Assignees
Labels
change request Issue requests a new feature or improvement
Milestone

Comments

@brendo
Copy link
Contributor

brendo commented Oct 12, 2016

Description

Using the rework branch, the repo_url is used to determine the platform. However this detection does not work for platforms if they are self hosted, such as Gitlab.

Expected behavior

The developer is able to explicitly state the platform through some means.

Actual behavior

The platform is determined from looking at the URL.

Steps to reproduce the bug

  1. Set repo url to something that does not include gitlab, github or bitbucket
  2. Note that there is no special treatment to the resulting page.

Perhaps this could be set via the extras configuration as repo_type?

(note that there's also a bug where if the repo_url is not specified at all mkdocs build will fail with TypeError: argument of type 'NoneType' is not iterable)

Package versions

  • Python: 2.7.12
  • MkDocs: mkdocs, version 0.15.3
  • Material: rework branch @ 7b585f1
@squidfunk
Copy link
Owner

Sounds good to me! I will prepare something for 1.0.x.

@squidfunk squidfunk added this to the 1.0.x milestone Oct 12, 2016
@squidfunk squidfunk self-assigned this Oct 12, 2016
@squidfunk
Copy link
Owner

(note that there's also a bug where if the repo_url is not specified at all mkdocs build will fail with TypeError: argument of type 'NoneType' is not iterable)

Fixed in eaeba59 (rework branch)

@squidfunk
Copy link
Owner

squidfunk commented Oct 16, 2016

Added repo_icon option to extra namespace in the rework branch:

extra.repo_icon = github
extra.repo_icon = gitlab
extra.repo_icon = bitbucket

Will be released with 1.0.0.

@squidfunk squidfunk modified the milestones: 1.0.0, 1.0.x Oct 16, 2016
@brendo
Copy link
Contributor Author

brendo commented Oct 17, 2016

Great! I can confirm extra.repo_icon variable works, and the NoneType error has also been resolved.

@brendo brendo closed this as completed Dec 2, 2016
@squidfunk squidfunk added change request Issue requests a new feature or improvement and removed feature labels Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants