Skip to content

Conversation

@brntbeer
Copy link
Member

@brntbeerbrntbeer commented Apr 28, 2016

We've had a few people ask us for offline version of the training kit! This should allow that.

A few details for this, since there's a lot going on:

  • I updated some Gems to match up with https://guides.github.com (private repo, sorry!)
  • rdiscount doesnt seem to be needed, but i'd love someone to confirm that (paging @azizshamim, if you could ❤️)
  • I removed the config for pygments, since it later seemed that i needed the gem? Things still work though.

cc @github/services-training for some 👀 on this. I'll likely merge it after some light review because it doesnt effect the actual deployment and rendering of the site.

To test this:

mkdir test_site mkdir test_site/kit tar -xzf release-xxxxx.tgz -C test_site/kit/ cd test_site python -m SimpleHTTPServer # starts a simple http server 

These scripts are also maining consistency with the way we build guides.github.com
github-pages is bumped to being at version 45 because that's what we do on guides, and consistency is awesome. updating to version 45 of github-pages made me need to update rdiscount to 2.1.8 because of github-pages dependency. we need to install pygments because though we're saying we have it for highlighter, we never included it?
We had a config for pygments, but it wasnt actually needed
@brntbeerbrntbeer self-assigned this Apr 28, 2016
@matthewmccullough
Copy link

We've had a few people ask us for offline version of the training kit! This should allow that.

Though I'm only speaking to the effort, and didn't do a technical review of the changes, I'm so appreciative of you investing in the Training Kit, @brntbeer. This helps so many thousands of people, and the Training team has exciting ideas about how to take this content to the next level of the next several months.

@brntbeer
Copy link
MemberAuthor

Bumped github-pages to latest and made sure things were vendor/cache'd correctly! whew.

@brntbeer
Copy link
MemberAuthor

@crichID and @github/services-training, any thoughts on merging this soon?

@brianamarie
Copy link
Contributor

@brntbeer I'm notoriously bad at getting things to test well locally, and that theme isn't dying here...apologies for being difficult... :bowtie:

For testing locally, tar -xzf release-xxxxx.tgz -C test_site/kit/ gets me the following: tar: Error opening archive: Failed to open 'release-xxxxx.tgz'. ¯_(ツ)_/¯

@brntbeer Thoughts on how I can fix this?

@brntbeer
Copy link
MemberAuthor

@brianamarie hmm, unclear. I just ran this and it worked...

To be clear, you are typing the correct release number right? not just release-xxxxxx.tgz? because the release that's made is dependent on the commit id and xxxxxxx is just a placeholder.

@brianamarie
Copy link
Contributor

To be clear, you are typing the correct release number right? not just release-xxxxxx.tgz? because the release that's made is dependent on the commit id and xxxxxxx is just a placeholder.

@brntbeer 😆 Nope, I was literally just typing the xxxx part. Two things:

  • What release # should I type to correct this now?
  • Is this made clear in the instructions for this type of duplication? If I make this mistake, there probably will be others that do the same.

@crichID
Copy link
Contributor

@brianamarie here are the steps you might need to add to the beginning of @brntbeer's instructions above:

  1. Clone this repo locally and check out to this branch (offline-packaging).
  2. Run the following script _buildscripts/package
  3. This will create a .tgz file in the same directory called release-0b548de.tgz
  4. Now follow the instructions @brntbeer provided in the original post, replacing release-xxxxx.tgz with release-0b548de.tgz.

@brntbeer this works perfect and looks ✨ for foundations, intermediate, advanced, and the cheat sheets. But I am getting a 404 for github-for-developers and github-for-everyone. Any ideas why?

@brntbeer
Copy link
MemberAuthor

What release # should I type to correct this now?

You should type the release number that's created in the file, this will change from version to version. For instance, if you update this from master, it will create a new commit and be something new entirely.

If you run _buildscript/package, you'll see a new file created, just typing tar -xvf releases-<tab>, where <tab> is the actual tab key, will do the trick to auto-complete the name of the package.

Is this made clear in the instructions for this type of duplication? If I make this mistake, there probably will be others that do the same.

No, it was my understanding that xxxxs stood for replacement characters in most practices like for secret_keys and API tokens. Would it be more explicit above if i said release-SOME-HASH-VALUE? I've still yet to make an edit to the README because honestly I can do that as a second PR

@brntbeer
Copy link
MemberAuthor

brntbeer commented Jun 6, 2016

. But I am getting a 404 for github-for-developers and github-for-everyone. Any ideas why?

@crichID yep, it fails when clicking on that link because it needs a .html at the end.

And honestly that's fine, we're serving it with a simple python server to just verify the HTML and css is bundled up correctly. It's up to the end user (read: enterprises trapped behind a firewall wanting this documentation) to implement their correct http server with rendering of those urls, and most simple httpservers can do this.

@crichID
Copy link
Contributor

it fails when clicking on that link because it needs a .html at the end.

@brntbeer of course, it had to be that simple 😉

It's up to the end user (read: enterprises trapped behind a firewall wanting this documentation) to implement their correct http server with rendering of those urls, and most simple httpservers can do this.

Is this something we should document in the README? Or do you think it is trivial?

Aside from the need to document this in the README, I think this looks good to 🚢!

@brntbeer
Copy link
MemberAuthor

@brntbeer of course, it had to be that simple 😉

@crichID it's cool, you have no idea how much i was getting frustrated over this before.

Aside from the need to document this in the README, I think this looks good to 🚢!

I'll make a separate PR to add this to the README as well as instructions for checking it works!

@brntbeerbrntbeer merged commit 93e7480 into masterJun 6, 2016
@brntbeerbrntbeer deleted the offline-packaging branch June 6, 2016 22:13
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@brntbeer@matthewmccullough@brianamarie@crichID