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_username always generates a link to username at github.com, not enterprise domain #4918

Closed
8 of 20 tasks
aeberbach opened this issue May 20, 2016 · 4 comments
Closed
8 of 20 tasks

Comments

@aeberbach
Copy link

aeberbach commented May 20, 2016

  • I believe this to be a bug, not a question about using Jekyll.
  • I Updated to the latest Jekyll (or) if on Github Pages to the latest github-pages
  • I Read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
  • I looked on talk.jekyllrb.com for mention of enterprise
  • I searched for other users with similar problems
  • As a new user of jekyll I'm still worried about looking stupid but I can't find out how to solve this
  • This is a feature request.

  • I am on (or have tested on) _Mac OS_ 10+
  • I am on (or have tested on) _Debian/Ubuntu_ GNU/Linux
  • I am on (or have tested on) _Fedora_ GNU/Linux
  • I am on (or have tested on) _Arch_ GNU/Linux
  • I am on (or have tested on) _Other_ GNU/Linux
  • I am on (or have tested on) _Windows_ 10+

  • I was trying to install.
  • There is a broken Plugin API.
  • I had an error on Github Pages, and I have not tested locally.
  • I had an error on Github Pages, and Github Support said it was a Jekyll Bug.
  • I had an error on Github Pages and I did not test it locally.
  • I was trying to build.
  • It was another bug.

My Reproduction Steps

Generate a new jekyll site and push it to gh-pages branch; edit _config.yml to add a github_username to link to the users account. The link generated will be to github.com, not the place your github enterprise repository is hosted. In my case a 404 is the result since my enterprise github username is not the same as my github username.

I think the file that causes this is found in the gem at jekyll-3.1.6/lib/site_template/_includes/icon-github.html - I'm an absolute ruby novice so I don't want to try changing this to see if it makes a difference, have had a broken ruby installation once and don't want to risk it.

The Output I Wanted

links generated should be https://github.myenterprisedomain.com not https://github.com

@parkr
Copy link
Member

parkr commented May 20, 2016

@aeberbach Hey, it sounds like you're having trouble with the site template. The template isn't supposed to encompass Enterprise at the moment (specifying just a github_username wouldn't suffice here; we'd also need the github URL, in this case https://github.myenterprisedomain.com).

When you run jekyll new, we generate these files and you are free to modify them. You are correct that icon-github.html is where you need to go to edit this. Simply change github.com to github.myenterprisedomain.com.

We're in the process of moving the example site out to its own theme for Jekyll 3.2 and we can re-evaluate then how this should be considered. We will want to support this going forward for sure, but for now please edit your copy of _includes/icon-github.html in your site.

/cc @jglovier on an elegant way to support Enterprise user links in the site template. 😄

@parkr parkr closed this as completed May 20, 2016
@ghost
Copy link

ghost commented May 20, 2016

@aeberbach, just a note: when @parkr says

for now please edit your copy of _includes/icon-github.html in your site

It's a reference to the _includes/icon-github.html in the site folder wherever you are developing your jekyll project. (the same folder where your _config.yml file is)

It is not a reference to the installed gem files you mentioned of jekyll-3.1.6/lib/site_template/_includes/icon-github.html - don't change the actual gem files.

Sorry if this is already something you know, but you mentioned editing a gem file in your post, and that's not a good idea.

@aeberbach
Copy link
Author

Got it - that will work for now, thank you both.

@jglovier
Copy link
Member

/cc @jglovier on an elegant way to support Enterprise user links in the site template.

Sorry for the delayed response. I'll open an issue in the minima gem theme where we can track this. ✨

@jekyll jekyll locked and limited conversation to collaborators Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants