diff --git a/.bowerrc b/.bowerrc deleted file mode 100644 index cc4897843..000000000 --- a/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "assets/vendor" -} diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index f5688f943..d79cdf3cc 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,32 +1,39 @@ ## Overview -**TL;DR** - -### Extra Detail + +### Extra detail + + #### Screenshots - + + #### Reasoning - - -### How to Contribute -- [ ] Comment on this issue if you'd like to work/collaborate on it! -- [ ] Fork the [repository](https://github.com/github/training-kit). -- [ ] Use the [GitHub Flow](https://guides.github.com/introduction/flow/) to make changes to your fork. [This](https://services.github.com/on-demand/intro-to-github/) is a refresher course if you're unsure about how to make a change on GitHub. -- [ ] Push your changes to your repository. -- [ ] Submit a Pull Request + + + +### How to contribute + +- Comment on this issue if you'd like to work/collaborate on it! +- Fork the [repository](https://github.com/github/training-kit). +- Use the [GitHub Flow](https://guides.github.com/introduction/flow/) to make changes to your fork. [This](https://github.com/skills/introduction-to-github) is a refresher course if you're unsure about how to make a change on GitHub. +- Push your changes to your repository. +- Submit a Pull Request - Base Dropdown: github/training-kit - Compare Dropdown: Your fork -#### Testing Locally +#### Testing locally + If you'd like to make and test changes locally (and see how they would look if merged), do the following: + - In your command line: - [Install Git](https://git-scm.com/) - [Install Ruby](https://www.ruby-lang.org/en/documentation/installation/) - [ ] Run `script/setup` - [ ] Run `script/server`. - - When successful, the script will initiate a local server at `http://127.0.0.1:4000/on-demand`. + - When successful, the script will initiate a local server at `http://127.0.0.1:4000/`. ### Questions? -- Leave a comment on this issue! Make sure to use @ mentions if you want a specific person's attention! + +- Leave a comment on this issue! Make sure to use `@mentions` if you want a specific person's attention! diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index aebe841f8..c41186e96 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,14 +1,19 @@ ## Overview -**TL;DR** - - + -### Next Steps - +## Questions -### Review - + + +## Next steps + + + +## Review + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..3591317b1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + + # Maintain dependencies for Bundler + - package-ecosystem: "bundler" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..6ec816d16 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,61 @@ +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'ruby' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 000000000..fe461b424 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,20 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v3 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v2 diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml new file mode 100644 index 000000000..8c9116eec --- /dev/null +++ b/.github/workflows/jekyll.yml @@ -0,0 +1,73 @@ +name: Deploy Jekyll site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + # Runs on pull requests targeting the default branch + pull_request: + branches: [ "main" ] + + # Allows us to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + - name: Install node modules + run: npm install + - name: Set up Ruby + uses: ruby/setup-ruby@ece82769428359c077b5a5eaff268902a303c101 + with: + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Set up Pages + id: pages + uses: actions/configure-pages@v2 + - name: Build and test with Rake + # Only run in pull requests + if: github.event_name == 'pull_request' + run: bundle exec rake + - name: Build with Jekyll + # Don't run in pull requests + if: github.event_name != 'pull_request' + # Outputs to the './_site' directory by default + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v1 + + # Deployment job + deploy: + # Only run on pushes to the default branch + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/.gitignore b/.gitignore index 8a37ff769..cd292a85a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,13 @@ _site/ .DS_Store /.rbenv-version -/vendor/gems/ +/vendor/ /bin/ /.bundle/ .sass-cache/ *.*~ _release *.map +.jekyll-metadata +node_modules/ +# *.resume-burger-jokes diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 2c1a03e59..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "_javascript/jquery-scrollsnap-plugin"] - path = _javascript/jquery-scrollsnap-plugin - url = https://github.com/benoitpointet/jquery-scrollsnap-plugin.git diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..ef538c281 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d0d589d89..000000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: ruby -rvm: - - 2.0 -script: - - script/cibuild diff --git a/CNAME b/CNAME new file mode 100644 index 000000000..91e8be9b2 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +training.github.com \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..8439872c6 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [services@github.com](mailto:services@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d976bcbae..1234ee022 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,84 @@ -# Help Us Improve These Materials +# Contributing to training-kit -We're always looking for contributions to help improve these materials. If you have corrections, polish, or materials contributions, please submit them via a [Pull Request](https://help.github.com/articles/using-pull-requests). +🎉 Thank you for taking the time to contribute and for seeking out these instructions. We :heart: community contributions to these materials. -If your contribution is larger than a syntax fix or sentence re-wording, please initiate a discussion via a new Issue (type `c` after switching focus to the [Issues](https://github.com/github/training-kit/issues) tab) so we can help guide your contribution to the right location in the materials. +--- + +## Code of Conduct + +This project and everyone who participates in it is governed by the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [services@github.com](mailto:services@github.com). + +--- + +## What should I know before I get started? + +### The goal of these resources + +These materials are designed to help those new to Git, GitHub and software development as a whole. By using these materials, we hope users will: + +- Feel welcome and become active contributors in the open source community +- Learn best practices for using Git and GitHub +- Learn how to use the applications within GitHub's ecosystem to build better software + +### Types of contributions we love + +We're always looking for contributions to help improve these resources. This includes: + +- Improving the existing cheat sheets +- Translations of existing cheat sheets into new languages +- Adding new courseware or resources aligned with the [goals](#the-goal-of-these-resources) + +--- + +## How to contribute + +### Report a bug + +Oops, thanks for finding that! If you know how to fix it, please feel free to fork the repository and submit a change via Pull Request. + +If you aren't sure how to fix it or just don't have time, we invite you to open a [new Issue](https://github.com/github/training-kit/issues/new). Please be sure to provide information, so we can recreate the error. + +### Translate existing resources + +Several community members have been kind enough to translate the Git Cheat Sheets into various languages. At this time, we are only set up to serve the cheat sheets in various languages (but maybe you can help us change that 😉). If you are planning to contribute a translation, please do the following: + +- Fork this repository +- Create a new folder in the [downloads directory](https://github.com/github/training-kit/tree/main/downloads) using the standard abbreviation for the language you are providing. +- Copy the most recent [English version of the cheat sheet](https://github.com/github/training-kit/blob/main/downloads/github-git-cheat-sheet.md) to the folder you created. +- Complete the translation +- Add a link to the translated resource on [/index.html](https://github.com/github/training-kit/blob/main/index.html) +- Open a pull request against the `main` branch of this repository. +- Be sure to @ mention a couple of your friends who are native speakers and ask them to review the translation. +- Update your translation based on feedback from your friends. + +When this process is complete, we will be happy to merge the completed document. + +### Contribute something new + +Whether you have an idea to make it better, or want to contribute a whole new course or resource ... we :heart: new ideas! We invite you to open a new [Issue](https://github.com/github/training-kit/issues/new) to talk about it before you invest too much time. Of course, if you want to experiment first, you can [fork this repository](https://help.github.com/articles/working-with-forks/) and submit your idea via a Pull Request. + +When you are contributing something new, we ask you to be familiar with our content philosophy, the structure of the repository, and building [Jekyll](https://jekyllrb.com/) sites locally. See the sections below for more information. + +### Not sure where to start? + +If you just want to help out, but don't have a particular change in mind, check out the [open issues](https://github.com/github/training-kit/issues) for projects you can tackle, review an [open pull request](https://github.com/github/training-kit/pulls), or check out [the project ROADMAP](https://github.com/github/training-kit/projects/1). + +--- + +### Styling content + +This site uses GitHub's CSS toolkit called [Primer](https://github.com/primer/primer-css). It's easy to use, and if your contribution requires some design or front-end work you should check out the [Primer Docs](http://primercss.io/). + +For writing style guides, we lean on the [GitHub Brand Guide](https://brand.github.com/). The [Content](https://brand.github.com/content/) section is a great place to start. + +### Building and testing + +When you are ready to test your changes, you will want to build the repository locally. This is fully automated through a series of shell scripts based [the scripts to rule them all](https://github.com/github/scripts-to-rule-them-all)! + +To build the materials do the following: + +1. Run `script/bootstrap` to install the dependencies +1. Run `script/build` to build the site +1. Run `script/server` + - When successful, the script will initiate a local server at `http://127.0.0.1:4000/`. +1. Simply paste that into your favorite web-browser, and you will be ready to test diff --git a/Gemfile b/Gemfile index b670e7b84..11c3791f3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,17 @@ source "https://rubygems.org" -gem 'github-pages' +gem 'jekyll' gem 'html-proofer' -gem 'rack-contrib', '~> 1.1.0' gem 'rake' + +group :jekyll_plugins do + gem 'jekyll-sass-converter', github: 'jekyll/jekyll-sass-converter' + gem 'sass-embedded' + gem 'jekyll-paginate' + gem 'jekyll-sitemap' + gem 'jekyll-gist' + gem 'jekyll-feed' + gem 'jemoji' + gem 'jekyll-redirect-from' + gem 'jekyll-octicons' +end diff --git a/Gemfile.lock b/Gemfile.lock index cd79501ce..2ef12e484 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,153 +1,157 @@ +GIT + remote: https://github.com/jekyll/jekyll-sass-converter.git + revision: 13d2054514b23ee3f221c4c51eb25bea9bc951f5 + specs: + jekyll-sass-converter (2.2.0) + sass-embedded (~> 1.54) + GEM remote: https://rubygems.org/ specs: - RedCloth (4.2.9) - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - addressable (2.4.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) - colorator (0.1) - colored (1.2) - ethon (0.9.0) - ffi (>= 1.3.0) - execjs (2.6.0) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - ffi (1.9.10) - gemoji (2.1.0) - github-pages (77) - RedCloth (= 4.2.9) - github-pages-health-check (= 1.1.0) - jekyll (= 3.0.5) - jekyll-coffeescript (= 1.0.1) - jekyll-feed (= 0.5.1) - jekyll-gist (= 1.4.0) - jekyll-github-metadata (= 1.11.1) - jekyll-mentions (= 1.1.2) - jekyll-paginate (= 1.1.0) - jekyll-redirect-from (= 0.10.0) - jekyll-sass-converter (= 1.3.0) - jekyll-seo-tag (= 1.4.0) - jekyll-sitemap (= 0.10.0) - jekyll-textile-converter (= 0.1.0) - jemoji (= 0.6.2) - kramdown (= 1.10.0) - liquid (= 3.0.6) - listen (= 3.0.6) - mercenary (~> 0.3) - rdiscount (= 2.1.8) - redcarpet (= 3.3.3) - rouge (= 1.10.1) - terminal-table (~> 1.4) - github-pages-health-check (1.1.0) - addressable (~> 2.3) - net-dns (~> 0.8) - octokit (~> 4.0) - public_suffix (~> 1.4) - typhoeus (~> 0.7) - html-pipeline (2.4.0) - activesupport (>= 2, < 5) + activesupport (7.0.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) + async (2.2.1) + console (~> 1.10) + io-event (~> 1.1.0) + timers (~> 4.1) + colorator (1.1.0) + concurrent-ruby (1.1.10) + console (1.16.2) + fiber-local + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + ethon (0.15.0) + ffi (>= 1.15.0) + eventmachine (1.2.7) + faraday (2.6.0) + faraday-net_http (>= 2.0, < 3.1) + ruby2_keywords (>= 0.0.4) + faraday-net_http (3.0.1) + ffi (1.15.5) + fiber-local (1.0.0) + forwardable-extended (2.6.0) + gemoji (3.0.1) + google-protobuf (3.21.9) + html-pipeline (2.14.3) + activesupport (>= 2) nokogiri (>= 1.4) - html-proofer (3.0.5) - activesupport (~> 4.2) + html-proofer (5.0.0) addressable (~> 2.3) - colored (~> 1.2) - mercenary (~> 0.3.2) - nokogiri (~> 1.5) - parallel (~> 1.3) - typhoeus (~> 0.7) + async (~> 2.1) + nokogiri (~> 1.13) + rainbow (~> 3.0) + typhoeus (~> 1.3) yell (~> 2.0) - i18n (0.7.0) - jekyll (3.0.5) - colorator (~> 0.1) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 1.1) - kramdown (~> 1.3) - liquid (~> 3.0) - mercenary (~> 0.3.3) - rouge (~> 1.7) + zeitwerk (~> 2.5) + http_parser.rb (0.8.0) + i18n (1.12.0) + concurrent-ruby (~> 1.0) + io-event (1.1.2) + jekyll (4.3.1) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (>= 0.3.6, < 0.5) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) safe_yaml (~> 1.0) - jekyll-coffeescript (1.0.1) - coffee-script (~> 2.2) - jekyll-feed (0.5.1) - jekyll-gist (1.4.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-feed (0.17.0) + jekyll (>= 3.7, < 5.0) + jekyll-gist (1.5.0) octokit (~> 4.2) - jekyll-github-metadata (1.11.1) - octokit (~> 4.0) - jekyll-mentions (1.1.2) - html-pipeline (~> 2.3) - jekyll (~> 3.0) + jekyll-octicons (17.7.0) + jekyll (>= 3.6, < 5.0) + octicons (= 17.7.0) jekyll-paginate (1.1.0) - jekyll-redirect-from (0.10.0) - jekyll (>= 2.0) - jekyll-sass-converter (1.3.0) - sass (~> 3.2) - jekyll-seo-tag (1.4.0) - jekyll (~> 3.0) - jekyll-sitemap (0.10.0) - jekyll-textile-converter (0.1.0) - RedCloth (~> 4.0) - jekyll-watch (1.4.0) - listen (~> 3.0, < 3.1) - jemoji (0.6.2) - gemoji (~> 2.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + jemoji (0.12.0) + gemoji (~> 3.0) html-pipeline (~> 2.2) - jekyll (>= 3.0) - json (1.8.3) - kramdown (1.10.0) - liquid (3.0.6) - listen (3.0.6) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9.7) - mercenary (0.3.6) - mini_portile2 (2.0.0) - minitest (5.8.4) - multipart-post (2.0.0) - net-dns (0.8.0) - nokogiri (1.6.7.2) - mini_portile2 (~> 2.0.0.rc2) - octokit (4.3.0) - sawyer (~> 0.7.0, >= 0.5.3) - parallel (1.8.0) - public_suffix (1.5.3) - rack (1.5.2) - rack-contrib (1.1.0) - rack (>= 0.9.1) - rake (10.3.2) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - rdiscount (2.1.8) - redcarpet (3.3.3) - rouge (1.10.1) - safe_yaml (1.0.4) - sass (3.4.22) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) - terminal-table (1.5.2) - thread_safe (0.3.5) - typhoeus (0.8.0) - ethon (>= 0.8.0) - tzinfo (1.2.2) - thread_safe (~> 0.1) - yell (2.0.6) + jekyll (>= 3.0, < 5.0) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.3) + listen (3.7.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + mini_portile2 (2.8.0) + minitest (5.16.3) + nokogiri (1.13.9) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + octicons (17.7.0) + octokit (4.25.1) + faraday (>= 1, < 3) + sawyer (~> 0.9) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (5.0.0) + racc (1.6.0) + rainbow (3.1.1) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.5) + rouge (4.0.0) + ruby2_keywords (0.0.5) + safe_yaml (1.0.5) + sass-embedded (1.55.0) + google-protobuf (~> 3.19) + rake (>= 10.0.0) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + timers (4.3.5) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (2.0.5) + concurrent-ruby (~> 1.0) + unicode-display_width (2.3.0) + webrick (1.7.0) + yell (2.2.2) + zeitwerk (2.6.1) PLATFORMS ruby DEPENDENCIES - github-pages html-proofer - rack-contrib (~> 1.1.0) + jekyll + jekyll-feed + jekyll-gist + jekyll-octicons + jekyll-paginate + jekyll-redirect-from + jekyll-sass-converter! + jekyll-sitemap + jemoji rake + sass-embedded BUNDLED WITH - 1.12.0 + 2.3.19 diff --git a/README.md b/README.md index 7c9784a2b..6142d1c11 100644 --- a/README.md +++ b/README.md @@ -1,77 +1,39 @@ -![servicesbanner](https://cloud.githubusercontent.com/assets/13326548/21035994/ad40c19c-bd77-11e6-97fa-78b068050c05.jpg) - -[![Build Status](https://travis-ci.org/github/training-kit.svg?branch=master)](https://travis-ci.org/github/training-kit) - # GitHub Training Kit -### Home of GitHub's On-Demand training - -This repository contains the completely open source on-demand training hosted at https://services.github.com/on-demand/. These materials are provided under a [_Creative Commons License_ license](https://github.com/github/training-kit/blob/master/LICENSE). - -## We :heart: Contributors Like You! - -**We’re eager to work with you**, our user community to improve these materials and develop new ones. Here's how you can help: - -- **You spotted a mistake:** please feel free to fork the repository and submit a change via Pull Request (not sure how to do that, [we have a course for you](https://services.github.com/on-demand)). -- **You have an idea to make it better:** we :heart: new ideas! We invite you to open a new [Issue](https://github.com/github/training-kit/issues) if you want to talk about it, or you can [fork this repository](https://help.github.com/articles/working-with-forks/) and submit your idea via a Pull Request. -- **You just want to help:** check out the [open issues](https://github.com/github/training-kit/issues) for projects you can tackle, review an [open pull request](https://github.com/github/training-kit/pulls), or check out [the project ROADMAP](https://github.com/github/training-kit/projects/1). - -For more information on contributing to this repository, check out our [CONTRIBUTING guide](https://github.com/github/training-kit/blob/master/CONTRIBUTING.md). -## :world_map: Finding Your Way +Open source courseware from the GitHub Professional Services team. -This repository contains three primary resources: +## We ❤️ contributors like you -- Our current [on-demand courses](https://services.github.com/on-demand/) can be found in the [paths directory](/paths) -- The translations of our popular [Git Cheat Sheets](https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf) can be found in the [downloads directory](/downloads). We're always looking for more. _P.S._ Right now the PDF generation is a manual process so please mention @github/services-training for assistance in getting your translation moved to the PDF. -- The recommended [Training Path](https://services.github.com/on-demand/path/) can be found [here](/self-study.md). +**We’re eager to work with you**, our user community, to improve these materials and develop new ones. Please check out our [CONTRIBUTING guide](CONTRIBUTING.md) for more information on getting started. -## Our Content Philosophy +## Looking for a resource that was once housed in training-kit? -We are eager to create materials that are easy to use and follow! To that end, here are a few guidelines we ask you to keep in mind: +This repository currently contains Git and GitHub cheat sheets. If you're looking for a project that used to be housed here, such as On-Demand training, reading lists, videos, and book recommendations, see [this commit](https://github.com/github/training-kit/tree/4fbf180e980ef973ba4cc4b8ef3d5f278ddc8c08) in the repository's history. -- We focus on providing clear, step-by-step instructions for completing an activity, giving the learner the opportunity to study the concept in greater detail with the Tell Me Why feature. -- We focus on minimalism. +## Projects used in training-kit -## Projects Used in Training-Kit - We use [Jekyll](https://jekyllrb.com/) and [Markdown](https://guides.github.com/features/mastering-markdown/). -- The theme for the on-demand training is [Minimal Mistakes](https://mmistakes.github.io/minimal-mistakes/) and has some [amazing documentation](https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/). -- The corner badge of an Octocat is from [tholman.com](http://tholman.com/github-corners/) +- Our content is styled using the [Primer CSS toolkit](https://github.com/primer/primer-css). -## Building and Packaging +## Packaging for viewing behind your firewall -#### Building and Testing Locally - -When you are ready to test your changes, you will want to build the repository locally. This is fully automated through a series of shell scripts based [the scripts to rule them all](https://github.com/github/scripts-to-rule-them-all)! - -To perform a build of the materials perform the following: - -1. Run `script/setup` -1. Run `script/server`. - - When successful, the script will initiate a local server at `http://127.0.0.1:4000/on-demand`. -1. Simply paste that into your favorite web-browser and you will be ready to test. - -#### Packaging for Viewing Behind Your Firewall - -If you'd like to have a copy of the files to be served from a web server inside of your firewall, start by running `script/package`. +If you'd like to have a copy of the files to be served from a web server inside your firewall, start by running `script/package`. 1. Run `script/package` to create a release tarball. This will be in the format `release-XXXXXXX.tgz` for you to take wherever you want. 2. To test this looks okay, create some folders `mkdir -p test_site/kit`. -3. Untar the release, `tar -xzf release-XXXXXXX.tgz -C test_site/kit`. +3. Extract the release, `tar -xzf release-XXXXXXX.tgz -C test_site/kit`. 4. Switch into the test_site directory, `cd test_site`. -5. View the site with `python -m SimpleHTTPServer`. _Note: Some servers are obviously more advanced than others and can handle redirects, smart recognition of `.html` files, etc_ - -## Licenses +5. View the site: + - For python version 2.x, run: `python -m SimpleHTTPServer` + - For python version 3.x, run: `python -m http.server` + - _Note: Some servers are more advanced than others and can handle redirects, smart recognition of `.html` files, etc_ -Site content is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/). CC-BY-4.0 gives you permission to use content for almost any purpose but does not grant you any trademark permissions, so long as you note the license and give credit, such as follows: +Site content is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/). CC-BY-4.0 gives you permission to use the content for almost any purpose but does not grant you any trademark permissions, so long as you note the license and give credit, such as follows: -> Content based on -> services.github.com/on-demand -> used under the -> CC-BY-4.0 -> license. +> Content based on [github.github.com/training-kit/](https://github.github.com/training-kit) used under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license. Code used to build and test the site as well as code samples on the site, if any, are licensed under [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/legalcode). CC0 waives all copyright restrictions but does not grant you any trademark permissions. -This means you can use the content and code in this repository except for GitHub trademarks in your own projects. +This means you can use the content and code in this repository except for GitHub trademarks in your projects. When you contribute to this repository you are doing so under the above licenses. diff --git a/Rakefile b/Rakefile index f51886d5a..1fe5893dd 100644 --- a/Rakefile +++ b/Rakefile @@ -1,11 +1,38 @@ -desc 'Clean up generated site' +require 'html-proofer' +require 'jekyll' + +Rake.application.options.trace = true + +desc 'Remove all generated files: destination folder, metadata file, Sass and Jekyll caches.' task :clean do - sh 'rm -rf _site' + Jekyll::Commands::Clean.process({}) end -task :test do - sh 'bundle exec jekyll build' +desc 'Build and serve the site' +task serve: [:build] do + Jekyll::Commands::Serve.process({}) +end + +desc 'Build the site' +task build: [:clean] do + Jekyll::Commands::Build.process({}) +end +desc 'Build and test the site' +task test: [:build] do + options = { + :check_html => true, # Validate HTML + :empty_alt_ignore => false, # Allow images with empty alt tags + :check_favicon => true, # Check whether favicons are valid + :check_img_http => true, # Enforce that images use HTTPS + typhoeus: { + headers: { + # This is required to validate links to docs.github.com + "Accept-Encoding" => "gzip", + } + } + } + HTMLProofer.check_directory("./_site", options).run end task default: :test diff --git a/_config.yml b/_config.yml index c50f9a96b..1a124d15e 100644 --- a/_config.yml +++ b/_config.yml @@ -3,38 +3,25 @@ domain: services.github.com author: GitHub, Inc. email: services@github.com - # Site Settings -locale : "en-US" +locale: "en-US" # Keep original, do not replace -title : "On Demand Training" -title_separator : "-" -name : "GitHub, Inc." -description : "You're in control. We're with you along the way." -baseurl : "/on-demand" # the subpath of your site, e.g. "/blog" -gh_repo : -teaser : # filename of teaser fallback teaser image placed in /images/, .e.g. "500x300.png" -breadcrumbs : true # true, false (default) -words_per_minute : 200 -comments: - provider : # false (default), "disqus", "discourse", "facebook", "google-plus", custom" - disqus: - shortname : # https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname- - discourse: - server : # https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963 , e.g.: meta.discourse.org - facebook: - # https://developers.facebook.com/docs/plugins/comments - appid : - num_posts : # 5 (default) - colorscheme : # "light" (default), "dark" - - - +title: "GitHub Cheatsheets" +title_separator: "-" +name: "GitHub, Inc." +description: +url: "https://training.github.com" +baseurl: "" # the subpath of your site, e.g. "/blog" +gh_repo: github/training-kit +repository: github/training-kit +teaser: # filename of teaser fallback teaser image placed in /images/, .e.g. "500x300.png" +breadcrumbs: true # true, false (default) +words_per_minute: 200 analytics: - provider : google # false (default), "google", "google-universal", "custom" + provider: google # false (default), "google", "google-universal", "custom" google: - tracking_id : UA-80557370-2 + tracking_id: UA-3769691-2 markdown_ext: "markdown,mkdown,mkdn,mkd,md" @@ -45,28 +32,31 @@ lsi: false excerpt_separator: "\n\n" incremental: false -# standard jekyll configuration - +# Standard jekyll configuration parentsite: https://services.github.com permalink: /articles/:title/ -gems: +plugins: - jekyll-paginate - jekyll-sitemap - jekyll-gist - jekyll-feed - jemoji + - jekyll-redirect-from + - jekyll-octicons exclude: -- bin -- config.rb -- Gemfile -- Gemfile.lock -- gems -- Procfile -- Rakefile -- README.md -- script -- vendor + - bin + - config.rb + - Gemfile* + - gems + - node_modules + - Procfile + - Rakefile + - README.md + - script + - vendor + - package.json + - package-lock.json collections: modules: @@ -75,11 +65,25 @@ collections: output: true include: -- _stylesheets -- _javascript + - _stylesheets + - _javascript + +# Primer CSS (https://primer.style/css/getting-started#for-a-jekyll-site) sass: - sass_dir: assets/_scss - style: :compressed + sass_dir: assets/css + load_paths: + - assets/_scss + - node_modules + style: compressed + implementation: sass-embedded # Custom site configuration lang: en + +defaults: + - scope: + path: "" + values: + lang: "en" + redirect_to: + - https://training.github.com diff --git a/_data/navigation.yml b/_data/navigation.yml deleted file mode 100644 index 1e02fe041..000000000 --- a/_data/navigation.yml +++ /dev/null @@ -1,175 +0,0 @@ -# main links links -main: -# Keep original nav, do not replace - - title: "Introduction to GitHub" - url: /intro-to-github/ - - title: "Using GitHub Desktop" - url: /github-desktop/ - - title: "Using the Command Line" - url: /github-cli/ - - title: "Git Out of Trouble" - beta: true - url: /git-trouble/ - - title: "GitHub for Windows Users" - beta: true - url: /windows/ - - title: "Git & GitHub Training Path" - url: /path/ - - title: "GitHub Training Community" - url: /community/ - -# When creating new sidebar navs, remember the url in this document needs to match the url assigned in the permalink field. - -intro-nav: - - title: "Introduction to GitHub" - url: /intro-to-github/ - - title: "Create a GitHub Account" - url: /intro-to-github/create-github-account - - title: "Join the Class Repository" - url: /intro-to-github/join-class-repository - - title: "Explore the GitHub Repository" - url: /intro-to-github/explore-github-repository - - title: "Use GitHub Flow" - url: /intro-to-github/use-github-flow - - title: "Create a Branch" - url: /intro-to-github/create-a-branch - - title: "Find Your Coordinates" - url: /intro-to-github/find-your-coordinates - - title: "Work on GitHub" - url: /intro-to-github/work-on-github - - title: "Create a Pull Request" - url: /intro-to-github/create-pull-request - - title: "Collaborate on GitHub" - url: /intro-to-github/collaborate-on-github - - title: "Edit Files on GitHub" - url: /intro-to-github/edit-files-on-github - - title: "Merge Your Pull Request" - url: /intro-to-github/merge-pull-request - - title: "You Completed the GitHub Flow" - url: /intro-to-github/you-completed-github-flow - -github-desktop-nav: - - title: "GitHub Pages & GitHub Desktop" - url: /github-desktop/ - - title: "Install GitHub Desktop" - url: /github-desktop/install-github-desktop - - title: "Create the Remote Repository on GitHub" - url: /github-desktop/create-remote-repository - - title: "Choose a GitHub Pages Theme" - url: /github-desktop/choose-github-pages-theme - - title: "Clone the Repository with GitHub Desktop" - url: /github-desktop/clone-repository-github-desktop - - title: "Create Local Branches With GitHub Desktop" - url: /github-desktop/create-branches-github-desktop - - title: "Make Local Changes With GitHub Desktop" - url: /github-desktop/make-changes-github-desktop - - title: "Add Local Commits With GitHub Desktop" - url: /github-desktop/add-commits-github-desktop - - title: "Open a Pull Request With GitHub Desktop" - url: /github-desktop/pull-request-github-desktop - - title: "Merge Your Pull Request on GitHub" - url: /github-desktop/merge-pull-request-github - - title: "View Your GitHub Pages Site" - url: /github-desktop/view-github-pages-site - - title: "Push to GitHub with GitHub Desktop" - url: /github-desktop/push-with-github-desktop - - title: "Add Your GitHub Pages Site to the Showcase" - url: /github-desktop/add-github-pages-site-showcase - - title: "Review the Local GitHub Flow" - url: /github-desktop/review-github-flow - - title: "Push to GitHub & Create a Pull Request" - url: /github-desktop/push-pull-request-github-desktop - - title: "Collaborate With GitHub Pull Requests" - url: /github-desktop/collaborate-github-pull-requests - - title: "Merge Your Pull Request on GitHub" - url: /github-desktop/merge-pull-request-showcase - -github-cli: - - title: "GitHub Pages & Git in the Command Line" - url: /github-cli/ - - title: "Git Configuration" - url: /github-cli/git-configuration - - title: "Create the Remote Repository on GitHub" - url: /github-cli/create-remote-repository - - title: "Choose a GitHub Pages Theme" - url: /github-cli/choose-github-pages-theme - - title: "Clone the Repository Using the Command Line" - url: /github-cli/clone-repo-cli - - title: "Create Local Branches With Git" - url: /github-cli/create-branches-git - - title: "Make Local Changes With Git" - url: /github-cli/make-local-changes-git - - title: "Add Local Commits With Git" - url: /github-cli/add-commits-git - - title: "Open a Pull Request on GitHub" - url: /github-cli/open-pull-request-github - - title: "Merge Your Pull Request on GitHub" - url: /github-cli/merge-pull-request-github - - title: "View Your GitHub Pages Site" - url: /github-cli/view-github-pages-site - - title: "Git Push & Git Pull" - url: /github-cli/git-push-git-pull - - title: "Add Your GitHub Pages Site to the Showcase" - url: /github-cli/add-github-pages-site-showcase - - title: "Review the Local GitHub Flow in the Command Line" - url: /github-cli/github-flow-cli - - title: "Review Pushing and Opening Pull Requests" - url: /github-cli/git-push-open-pull-request - - title: "Collaborate With GitHub Pull Requests" - url: /github-cli/collaborate-github-pull-requests - - title: "Merge Your Pull Request on GitHub" - url: /github-cli/merge-pull-request-github-showcase - -advanced: - - title: "Welcome to Git Out Of Trouble" - url: /git-trouble/ - - title: "Set Up Your Git Scenario Environment" - url: /git-trouble/git-set-up - - title: "Git Trouble Scenarios" - url: /git-trouble/git-scenarios - children: - - title: "Too Many (small) Git Commits" - url: /git-trouble/too-many-commits - - title: "Git Commit Message Sucks" - url: /git-trouble/git-commit-message - - title: "Git Committed to Wrong Branch" - url: /git-trouble/git-commit-wrong-branch - - title: "Accidental Git Commit" - url: /git-trouble/accidental-git-commit - - title: "Just Make it Go Away - Breaking Things With Git" - url: /git-trouble/breaking-things-with-git - -windows: - - title: "Welcome to GitHub for Windows Users" - url: /windows/ - - title: "Get Started" - url: /windows/getting-started - children: - - title: "Install Git" - url: /windows/installing-git - - title: "Configure Git" - url: /windows/configure-git - - title: "Configure Line Endings" - url: /windows/git-crlf - - title: "Store Your Password" - url: /windows/git-credentials - - title: "Editors" - url: /windows/editors - children: - - title: "vi Basics" - url: /windows/vi-basics - - title: "Configure Other Editors" - url: /windows/configure-editors - - title: "Visual Studio Integration" - url: /windows/visual-studio - children: - - title: "Install the GitHub Extension" - url: /windows/install-visual-studio - - title: "Start a Project" - url: /windows/vs-start-project - - title: "Make a Commit" - url: /windows/vs-make-commit - - title: "What is Sync?" - url: /windows/vs-sync - - title: "Congratulations" - url: /windows/congrats diff --git a/_data/ui-text.yml b/_data/ui-text.yml deleted file mode 100644 index 99daed158..000000000 --- a/_data/ui-text.yml +++ /dev/null @@ -1,68 +0,0 @@ -# User interface text and labels - -# English (default) -# ----------------- -en: &DEFAULT_EN - page : "Page" - pagination_previous : "Previous" - pagination_next : "Next" - breadcrumb_home_label : "Home" - breadcrumb_separator : "/" - toc_label : "On This Page" - ext_link_label : "Direct Link" - less_than : "less than" - minute_read : "minute read" - minutes_read : "minutes read" - share_on_label : "Share on" - meta_label : - tags_label : "Tags:" - categories_label : "Categories:" - date_label : "Updated:" - comments_label : "Leave a Comment" - more_label : "Learn More" - related_label : "You May Also Enjoy" - follow_label : "Follow:" - feed_label : "Feed" - powered_by : "Powered by" - website_label : "Website" - email_label : "Email" - recent_posts : "Recent Posts" -en-US: - <<: *DEFAULT_EN -en-UK: - <<: *DEFAULT_EN - -# Spanish -# -------------- -es: &DEFAULT_ES - page : "Página" - pagination_previous : "Anterior" - pagination_next : "Siguiente" - breadcrumb_home_label : "Inicio" - breadcrumb_separator : "/" - toc_label : "Contenidos" - ext_link_label : "Enlace" - less_than : "menos de" - minute_read : "minuto de lectura" - minutes_read : "minutos de lectura" - share_on_label : "Compartir" - meta_label : - tags_label : "Etiquetas:" - categories_label : "Categorías:" - date_label : "Actualizado:" - comments_label : "Comentar" - more_label : "Ver más" - related_label : "Podrías ver también" - follow_label : "Seguir:" - feed_label : "Feed" - powered_by : "Powered by" - website_label : "Sitio web" - email_label : "Email" - recent_posts : "Entradas recientes" -es-ES: - <<: *DEFAULT_ES -es-CO: - <<: *DEFAULT_ES - -# Another locale -# -------------- diff --git a/_includes/activity/gh-pages/02-create-profile.md b/_includes/activity/gh-pages/02-create-profile.md deleted file mode 100644 index 9e4057c0c..000000000 --- a/_includes/activity/gh-pages/02-create-profile.md +++ /dev/null @@ -1,34 +0,0 @@ -{% capture activity-text %} -# Activity: Create a Profile Page - -Follow the steps below to update your public profile page! - -Don't worry if you don't want to put your actual information up online. It's OK to just make stuff up. But if you do want to create an actual portfolio, we'd recommend doing that here! - -1. On your personal repo, create a new branch named `profile-info` -2. Edit the `content.md` file located in the `/_index/` folder. - - Add a new image - - Add your name - - Add a title - - Add bio information -3. Commit the changes you made to the `content.md` file. -4. Edit the `_config.yml` file by changing the following: - - title - - email - - twitter - - github - - description fields -5. Change the `baseurl:` to the **name of your GitHub repo**. -6. Change the `url:` to `http://username.github.io`, where `username` is your GitHub username. -7. Create a Pull Request comparing the `profile-info` branch to the base branch `gh-pages`. -8. Merge the Pull Request. -9. Look at your creation at `http://username.github.io/repo-name`. - -{% endcapture %} - -
- {{ activity-text | markdownify }} -
- -Need help? Click **open chat** below for answers from GitHub trainers! -{: .notice--success} diff --git a/_includes/activity/gh-pages/03-create-new-page.md b/_includes/activity/gh-pages/03-create-new-page.md deleted file mode 100644 index cdd33d5fe..000000000 --- a/_includes/activity/gh-pages/03-create-new-page.md +++ /dev/null @@ -1,19 +0,0 @@ -{% capture activity-text %} -# Activity: Create a New Page - -Time to add our work history as a page to our Jekyll site. - -1. Create a new branch off the ```gh-pages``` branch named ```work-history```. -2. In the ```_pages``` folder, create a **new** file named ```work-history.md```. -3. Add your work history to the file and click ```Commit```. If you'd like, you can copy and paste the work history we provided earlier in the course. -4. Create a **pull request** selecting ```gh-pages``` as the **base** and ```work-history``` as the **compare**. -5. Merge the **pull request**. -6. Navigate to your website to see the changes you just made. -{% endcapture %} - -
- {{ activity-text | markdownify }} -
- -Need help? Click **open chat** below for answers from GitHub trainers! -{: .notice--success} diff --git a/_includes/activity/gh-pages/04-more-content.md b/_includes/activity/gh-pages/04-more-content.md deleted file mode 100644 index ca13994d6..000000000 --- a/_includes/activity/gh-pages/04-more-content.md +++ /dev/null @@ -1,28 +0,0 @@ -{% capture activity-text %} -# Activity: Additional Challenges - -Below are some projects that you can take on that will challenge your templating skills. We're leaving them more open-ended instead of giving you step-by-step instructions, so feel free to ask a mentor if you need help. - -### Add Nav Links - -"Edit your project so that you can have pages which have a `title:` element but which don't show up in the nav bar. You'll need to come up with a system (a mentor can help) and edit the `_includes/header.html` page, as well as the front matter in all of your site pages." - -### Work History with Style - -Earlier you created a Work History page. This isn't very well formatted though. Try using CSS and templates to clean up the page. If you create a Work History template you can wrap the content in a new div, and then format the elements using CSS so that formatting only applies to that page. - -### Collections - -You might also look into the "collections" functionality in Jekyll. This would let you create a different markdown file (and front matter data) for each job description. How might this make formatting the page easier? - - - - -{% endcapture %} - -
- {{ activity-text | markdownify }} -
- -Need help? Click **open chat** below for answers from GitHub trainers! -{: .notice--success} diff --git a/_includes/activity/github-CLI/00-basic-CLI-config.md b/_includes/activity/github-CLI/00-basic-CLI-config.md deleted file mode 100644 index 91201ca24..000000000 --- a/_includes/activity/github-CLI/00-basic-CLI-config.md +++ /dev/null @@ -1,12 +0,0 @@ -This class uses the command line, so first you will need to find and open your terminal. For Windows, we recommend using [**Git Shell** or **Git Bash**](https://git-scm.com/download/windows). For Mac or Linux, your default terminal will work. - -Before you can work with Git on the command line, you will need to set some basic configurations: - -1. Open your terminal application. -2. Type `git --version` to ensure Git is installed. Version `1.9.5` or :arrow_up: is :+1:. Check [git-scm.com](https://git-scm.com/) to download the latest version. -3. Type `git config --global user.name "USER NAME"`, replacing `USERNAME` with your first and last name. -4. Type `git config --global user.email "EMAIL"`, replacing `EMAIL` with the email account associated with your GitHub account. -5. Depending on your operating system, set the `core.autocrlf`. - - **Windows users:** Type `git config --global core.autocrlf true`. - - **Mac & Linux users:** Type `git config --global core.autocrlf input`. -6. Type `git config --list` to see your current configurations. diff --git a/_includes/activity/github-CLI/02-clone-repository.md b/_includes/activity/github-CLI/02-clone-repository.md deleted file mode 100644 index 30865985b..000000000 --- a/_includes/activity/github-CLI/02-clone-repository.md +++ /dev/null @@ -1,11 +0,0 @@ -After you've created a repository on the remote, the next step is to clone it to your local environment. - -1. Navigate to the Code tab of the repository on GitHub.com. -1. Click **Clone or download**. -1. Copy the **Clone URL** provided. -1. Open your command line/terminal application and `cd` into the directory where you would like to copy the repository. This can be anywhere in your local file system. -1. Type `git clone URL`. Be sure to replace `URL` with the Clone URL you copied in the previous step. The repository will be cloned into a new directory in this location. -1. Type `cd REPOSITORY-NAME` to move into the directory of the repository you just created. -1. Type `git status`. - -`git status` is a command you will use often to verify the current state of your repository and the files it contains. Right now, we can see that we are on branch `master`, everything is up to date with `origin/master` and our working directory is clean. diff --git a/_includes/activity/github-CLI/03-branch-locally.md b/_includes/activity/github-CLI/03-branch-locally.md deleted file mode 100644 index 1ad8effa1..000000000 --- a/_includes/activity/github-CLI/03-branch-locally.md +++ /dev/null @@ -1,6 +0,0 @@ -Now that you have a local copy of the repository, let's use the steps of the [GitHub Flow](https://guides.github.com/introduction/flow/) to make a change in your project. First we will create a branch: - -1. Create a new branch with a descriptive name: `git branch BRANCH-NAME`. -1. Type `git status` to see that although you created a new branch, you are still checked out to **master** (as indicated by the in-line response from Git). -1. Check out to your new branch: `git checkout BRANCH-NAME`. -1. Type `git status` to verify you are now checked out to your new branch. diff --git a/_includes/activity/github-CLI/05-make-commits.md b/_includes/activity/github-CLI/05-make-commits.md deleted file mode 100644 index f30469fb0..000000000 --- a/_includes/activity/github-CLI/05-make-commits.md +++ /dev/null @@ -1,11 +0,0 @@ -After you have finished making your changes, it is time to commit them. - -1. Type `git status`. Remember that `git status` allows us to see the status of the files on our branch at any given time. -Your file is listed under the heading _Untracked files_. -1. Type `git add FILE-NAME`. This adds the file to the staging area and prepares it to become part of the next commit. -1. Type `git status` again to see what has changed. Your file is now listed under the heading _Changes to be committed_. This tells us that the file is in the staging area. It also indicates this is a new file. -1. Type `git commit`. This tells git to collect all of the files in the staging area and commit them to version control as a single unit of work. Git will open your default text editor where you can enter the commit message. -1. Type the commit message, save and quit your editor. - - The default text editor associated with git is `vi` in most cases, which requires that you type `:wq` to save and quit after entering your commit message. - - Alternatively, you can bypass `vi` altogether and enter your commit message inline with `git commit -m "your message"` -1. To see the history of commits, type `git log`. diff --git a/_includes/activity/github-CLI/06-git-push.md b/_includes/activity/github-CLI/06-git-push.md deleted file mode 100644 index 25dcab9b9..000000000 --- a/_includes/activity/github-CLI/06-git-push.md +++ /dev/null @@ -1,6 +0,0 @@ -Now that you have made some local commits, it is time to send your changes to the remote copy of your repository on GitHub.com and create a Pull Request: - -1. Type `git push -u origin BRANCH-NAME` to push your commits to the remote, and set a tracking branch. -1. Enter your GitHub username and password, if prompted to do so. -1. Create a Pull Request on GitHub. -1. Fill out the body of the Pull Request with information about the changes you're introducing. diff --git a/_includes/activity/github-CLI/10-add-website-commits.md b/_includes/activity/github-CLI/10-add-website-commits.md deleted file mode 100644 index e02f0135f..000000000 --- a/_includes/activity/github-CLI/10-add-website-commits.md +++ /dev/null @@ -1,17 +0,0 @@ -Now that you are a collaborator, use the local workflow we just learned to make changes to this repository. This exercise is a bit of a review, but if you need assistance with any of the required steps, more detailed directions are available in 'I need a refresher' below! Good luck! - -1. Clone the repository to your local machine. -1. Create a new branch in the cloned repository. Something like `yourUsername-add-page` is a perfect branch name. -1. Checkout to your new branch. -1. Create a file in the `_pages` directory titled: `username.yaml`. Replace `username` with your GitHub username. -1. Enter the following content into your file: - - --- - githubHandle: YOUR-USERNAME - pageUrl: YOUR-USERNAME.github.io - timestamp: TODAYS-DATE-YYYY-MM-DD - --- - - -1. Commit your changes. -1. Type `git status` to ensure your work was committed. diff --git a/_includes/activity/github-CLI/11-sync-changes.md b/_includes/activity/github-CLI/11-sync-changes.md deleted file mode 100644 index 768824113..000000000 --- a/_includes/activity/github-CLI/11-sync-changes.md +++ /dev/null @@ -1,4 +0,0 @@ -After you merge your Pull Request, you will need to update your local copy of the repository: - -1. In your command line, type `git checkout master`. -2. Type `git pull`. diff --git a/_includes/activity/github-CLI/clisurvey.md b/_includes/activity/github-CLI/clisurvey.md deleted file mode 100644 index a1b28dccc..000000000 --- a/_includes/activity/github-CLI/clisurvey.md +++ /dev/null @@ -1,2 +0,0 @@ -## We :heart: Feedback - Please take _literally less than a minute_ to let us know what you think of this course. You may also choose to opt-in for updates on future classes. [Start Survey](http://www.surveygizmo.com/s3/3288550/cli)! diff --git a/_includes/activity/github-CLI/git-diff.md b/_includes/activity/github-CLI/git-diff.md deleted file mode 100644 index d3aa6b3fc..000000000 --- a/_includes/activity/github-CLI/git-diff.md +++ /dev/null @@ -1,7 +0,0 @@ -# Git Diff - -1. Type `git diff`. Let's start with `git diff` without any options. This command compares the changes you have made in the working directory with the staged version of the file. -1. Type `git diff --staged`. When you add the `--staged` option, `git diff` will compare the staged version with the most recent committed version of the file. -1. Type `git diff HEAD`. When you add `HEAD` after the `git diff` command, git combines the changes in your working and staging areas and compares them with the version of the file that is currently designated as the `HEAD`. In most cases, this is the most recent commit in the history of the file. -1. Type `git diff --color-words`. The default for `git diff` is to compare lines of change, but sometimes this is not helpful when we have only made a small change. We can add the option `--color-words` to get a word-by-word comparison instead of the line level comparison. -1. When you are finished, `commit` your file changes. diff --git a/_includes/activity/github-CLI/git-log.md b/_includes/activity/github-CLI/git-log.md deleted file mode 100644 index cecddc1db..000000000 --- a/_includes/activity/github-CLI/git-log.md +++ /dev/null @@ -1,11 +0,0 @@ -To see the history of commits, use the command `git log`. It provides a list of all of the commits made on our branch with the most recent commit first. You aren't stuck with the default behavior - try these log commands to view history in different ways. - -1. Type `git log`. -1. Press `q`. You can press the up or down arrows or press enter to view additional log entries. Type q to quit viewing the log and return to the command prompt. -1. Type `git log -5` to only see the last 5 commits. -1. Type `git log --oneline`. -1. Type `git log --oneline --graph`. -1. Type `git log --oneline --graph --decorate`. -1. Type `git log --oneline --graph --decorate --all`. -1. Type `git log --stat`. -1. Type `git log --patch`. diff --git a/_includes/activity/github-desktop/00-install-configure-gh-desktop.md b/_includes/activity/github-desktop/00-install-configure-gh-desktop.md deleted file mode 100644 index 55cfad041..000000000 --- a/_includes/activity/github-desktop/00-install-configure-gh-desktop.md +++ /dev/null @@ -1,7 +0,0 @@ - -For this class you will use GitHub Desktop to work with your GitHub repository. - -1. Download and install [GitHub Desktop](https://desktop.github.com). -1. Open GitHub Desktop. -1. Follow the prompts to sign in to your account. -1. Configure your user information (this only happens the first time you run the application). diff --git a/_includes/activity/github-desktop/01-create-repository.md b/_includes/activity/github-desktop/01-create-repository.md deleted file mode 100644 index 6b88c8769..000000000 --- a/_includes/activity/github-desktop/01-create-repository.md +++ /dev/null @@ -1,8 +0,0 @@ -Now that you have what you need for Git and GitHub installed locally, let's create the repository that will hold your new website. - -1. On GitHub.com, [create a new repository](https://github.com/new). -1. Name your repository. -1. Enter a description for your repository. -1. We recommend you create a public repository. Public repositories are free. Even if you select a private repository, your published website will be public. -1. Check the box to initialize the repository with a README. -1. Click **Create repository**. diff --git a/_includes/activity/github-desktop/02-clone-locally.md b/_includes/activity/github-desktop/02-clone-locally.md deleted file mode 100644 index cb151da14..000000000 --- a/_includes/activity/github-desktop/02-clone-locally.md +++ /dev/null @@ -1,8 +0,0 @@ -After you've created a repository on the remote, the next step is to clone it to your local environment. - -1. Sign in to GitHub.com and GitHub Desktop. -1. On GitHub.com, navigate to the Code tab of the repository. -1. On the right side of the screen, click `Clone or download`. -1. Click `Open in Desktop`. This will open GitHub Desktop. -1. Verify the location on your hard drive where you would like to copy the repository. -1. Click `Clone`. diff --git a/_includes/activity/github-desktop/03-create-branch.md b/_includes/activity/github-desktop/03-create-branch.md deleted file mode 100644 index 21e11b8e4..000000000 --- a/_includes/activity/github-desktop/03-create-branch.md +++ /dev/null @@ -1,7 +0,0 @@ - -Now that you have a local copy of the repository, let's use the steps of [GitHub Flow](https://guides.github.com/introduction/flow/) to make a change in your project. First we will create a branch: - -1. At the top of GitHub Desktop, click the button. -1. In the `Name` field, type a meaningful name for your branch. Something like `add-index-page` will work nicely. -1. Click `Create branch`. -1. GitHub Desktop will automatically create your new branch and switch you to it. diff --git a/_includes/activity/github-desktop/04-make-changes-locally.md b/_includes/activity/github-desktop/04-make-changes-locally.md deleted file mode 100644 index 91ba7011f..000000000 --- a/_includes/activity/github-desktop/04-make-changes-locally.md +++ /dev/null @@ -1,8 +0,0 @@ - -It's time to create the home page for your website. - -1. Make sure you are checked out to the new branch you just created. -1. Open your preferred text editor. -1. Create a new file named `index.html`. -1. In your `index.html` file, include at least the following two lines: `

Hello World!

` and `

My name is GITHUB_USERNAME

`. Bonus points for including more information, or using [Jekyll Themes](http://jekyllthemes.org/) to create a more robust site. -1. When you are finished, save your file inside your repository folder, and close the text editor. diff --git a/_includes/activity/github-desktop/05-committing-locally.md b/_includes/activity/github-desktop/05-committing-locally.md deleted file mode 100644 index 9a9544dbc..000000000 --- a/_includes/activity/github-desktop/05-committing-locally.md +++ /dev/null @@ -1,8 +0,0 @@ - -After you have finished making your changes, it is time to commit them. - -1. Click the changes tab to see a list of the files that have been changed or added since the last commit. -1. Use the checkboxes to indicate which files should be part of the commit. In this activity, you'll select the `index.html` file. -*Note: It is a good idea to group files together based on the type of changes or the file content. For example, if you fixed the same formatting issue in several documents, you should group them into one commit.* -1. Type your commit message in the Summary field. -1. You will notice that GitHub Desktop has already populated the commit button with the current branch. Simply click the button to commit your changes. diff --git a/_includes/activity/github-desktop/06-pull-request.md b/_includes/activity/github-desktop/06-pull-request.md deleted file mode 100644 index 4f136b8c6..000000000 --- a/_includes/activity/github-desktop/06-pull-request.md +++ /dev/null @@ -1,6 +0,0 @@ -Now that you have made some local commits, it is time to send your changes to the remote copy of your repository on GitHub.com: - -1. On GitHub Desktop, click the Pull Request button. -1. Complete the fields of the Pull Request just like you would on GitHub.com. Ensure the `base` branch (the one on the left) is `master` and that the `compare` branch (the one on the right) is the one you created on GitHub Desktop. -1. Click `Send Pull Request`. GitHub Desktop will send your changes and create a pull request. -1. You will receive a confirmation message including the link to your Pull Request. Click the link to view your newly created Pull Request on GitHub.com! diff --git a/_includes/activity/github-desktop/07-merge-pull-request.md b/_includes/activity/github-desktop/07-merge-pull-request.md deleted file mode 100644 index 65e69047a..000000000 --- a/_includes/activity/github-desktop/07-merge-pull-request.md +++ /dev/null @@ -1,4 +0,0 @@ -Since this is your repository, you probably don't have anyone to collaborate with (yet). Go ahead and merge your Pull Request now: - -1. On GitHub.com, navigate to the Pull Request that you just opened. -1. Scroll down and click the big green **Merge Pull Request** button. diff --git a/_includes/activity/github-desktop/08-sync-desktop.md b/_includes/activity/github-desktop/08-sync-desktop.md deleted file mode 100644 index a6f6bb6d2..000000000 --- a/_includes/activity/github-desktop/08-sync-desktop.md +++ /dev/null @@ -1,5 +0,0 @@ -After you merge your Pull Request, you will need to update your local copy of the repository: - -1. Navigate back to GitHub Desktop. -1. Select the `master` branch at the top of the app. -1. Click the **Sync** button on the top right side of the app to update your local copy of the repository with the changes from the remote repository. diff --git a/_includes/activity/github-desktop/12-add-class-repo.md b/_includes/activity/github-desktop/12-add-class-repo.md deleted file mode 100644 index f7ec7f9f0..000000000 --- a/_includes/activity/github-desktop/12-add-class-repo.md +++ /dev/null @@ -1,5 +0,0 @@ -It's time to share your page with the world! To do that, you will follow the same steps of the GitHub workflow, but this time you will do it on the class repository: - -1. Visit the [class repository](https://github.com/githubschool/on-demand-github-pages/). -1. Click the **Issues** tab. -1. Request push access by creating an [Issue](https://github.com/githubschool/on-demand-github-pages/issues/). diff --git a/_includes/activity/github-desktop/13-review-workflow.md b/_includes/activity/github-desktop/13-review-workflow.md deleted file mode 100644 index 353548596..000000000 --- a/_includes/activity/github-desktop/13-review-workflow.md +++ /dev/null @@ -1,20 +0,0 @@ - -Now that you are a collaborator, let's use the local workflow we just learned to make changes to this repository: - -1. Start from the Code tab of the [class repository on GitHub.com](https://github.com/githubschool/on-demand-github-pages/). -1. Click on `Clone or Download` and select `Open in Desktop`. -1. Confirm where you'd like to save your project on GitHub Desktop. -1. Create a branch and label it with your username, something like `yourUsername-add-page`. -1. In your favorite text editor, add a file to the `_pages` directory. Include your GitHub handle in the filename: `username.yaml`. -1. Enter the following content into your file: - - --- - githubHandle: YOUR-USERNAME - pageUrl: YOUR-HANDLE.github.io - timestamp: TODAYS-DATE-YYYY-MM-DD - --- - -1. Ensure you've replaced `YOUR-USERNAME` with your GitHub Username, `YOUR-SITES-URL` with the URL to your site (which should be `YOUR-USERNAME.github.io`), and `TODAYS-DATE-YYYY-MM-DD` with today's date, using a 4-digit year, 2-digit month, and 2-digit day. For example, if today is October 17, 2016, you would enter: `2016-10-17`. -1. On GitHub Desktop, within the `Uncommitted Changes` tab, ensure your file is checked. -1. On GitHub Desktop, enter a commit message describing the change you're introducing to the project. -1. On GitHub Desktop, click the `Commit to YOUR-BRANCH` button -- ensure `YOUR-BRANCH` includes your username. diff --git a/_includes/activity/github-desktop/15-collaborate-prs.md b/_includes/activity/github-desktop/15-collaborate-prs.md deleted file mode 100644 index ccf74f2cd..000000000 --- a/_includes/activity/github-desktop/15-collaborate-prs.md +++ /dev/null @@ -1,6 +0,0 @@ - -It's now time to collaborate with other learners taking this class around the :earth_americas:. - -1. In the [class repository on GitHub.com](https://github.com/githubschool/on-demand-github-pages/), navigate to the [Pull Requests tab](https://github.com/githubschool/on-demand-github-pages/pulls). -1. Look through other pull requests. Do they look like good changes, with CI passing? Feel free to post an encouraging message! -1. In your own pull request, wait to see if the branch passes the Travis CI tests and is ready to merge. diff --git a/_includes/activity/github-desktop/16-merge-pr.md b/_includes/activity/github-desktop/16-merge-pr.md deleted file mode 100644 index 3d70e7e8a..000000000 --- a/_includes/activity/github-desktop/16-merge-pr.md +++ /dev/null @@ -1,14 +0,0 @@ -Now that your tests have passed, let's click the big green button to add your site to our directory! - -1. On GitHub.com, check to ensure the tests are passing. -1. Click the `Merge` button. -1. Click `Confirm Merge`. -1. Delete the branch. - -## :tada: Congratulations! - -Once you have merged your pull request, you have completed the GitHub workflow! Refresh this page to see your addition to our contribution graph! - -
-
-
diff --git a/_includes/activity/github-desktop/choose-a-theme.md b/_includes/activity/github-desktop/choose-a-theme.md deleted file mode 100644 index f07a06293..000000000 --- a/_includes/activity/github-desktop/choose-a-theme.md +++ /dev/null @@ -1,8 +0,0 @@ -This course is going to use GitHub Pages to create your website. To initialize GitHub Pages we need to perform a few more steps: - -1. With your repository created, click the **Settings** tab. -1. On the Options section (default information displayed), scroll down to the **GitHub Pages** section. -1. Click **Choose a theme**. -1. Decide which theme you would like to use, and click **Select theme**. -1. Accept the filler text by scrolling to the bottom of the page and click on **Commit Changes**. -1. Your site is published at: `USERNAME.github.io/REPONAME`. diff --git a/_includes/activity/github-desktop/desktopsurvey.md b/_includes/activity/github-desktop/desktopsurvey.md deleted file mode 100644 index e1fdeda25..000000000 --- a/_includes/activity/github-desktop/desktopsurvey.md +++ /dev/null @@ -1,2 +0,0 @@ -## We :heart: Feedback - Please take _literally less than a minute_ to let us know what you think of this course. You may also choose to opt-in for updates on future classes. [Start Survey](http://www.surveygizmo.com/s3/3288550/desktop)! diff --git a/_includes/activity/intro-to-github/00-create-github-account.md b/_includes/activity/intro-to-github/00-create-github-account.md deleted file mode 100644 index 458910874..000000000 --- a/_includes/activity/intro-to-github/00-create-github-account.md +++ /dev/null @@ -1,10 +0,0 @@ -For this class, you will need an account on GitHub.com. - -If you already have a Github.com account you are ready to get started. Otherwise, you can set up your free account by following these steps: - -1. Access GitHub.com and click Sign up. -2. Choose the free account. -3. You will receive a verification email at the address provided. -4. Click the emailed link to complete the verification process. - -If you are wondering where to go from here, click **Tell my why** for a quick tour of your dashboard. diff --git a/_includes/activity/intro-to-github/01-join-intro-repo.md b/_includes/activity/intro-to-github/01-join-intro-repo.md deleted file mode 100644 index a6a363817..000000000 --- a/_includes/activity/intro-to-github/01-join-intro-repo.md +++ /dev/null @@ -1,4 +0,0 @@ -It's time to get your hands dirty! Use these steps to access our shared project: - -1. Sign in with your GitHub account. -2. Navigate to our shared project and become a collaborator. Click on [this link](https://github.com/githubschool/open-enrollment-classes-introduction-to-github/issues/) and create an issue. The GitHubTeacher user will auto-magically add you to our project as a collaborator. diff --git a/_includes/activity/intro-to-github/02-manage-notifications.md b/_includes/activity/intro-to-github/02-manage-notifications.md deleted file mode 100644 index 088ef5354..000000000 --- a/_includes/activity/intro-to-github/02-manage-notifications.md +++ /dev/null @@ -1,4 +0,0 @@ -GitHub defaults to over communication and lets you decide what you do and do not want to receive: - -1. Scroll to the top of issue #927. -2. On the right side of the issue, click **Unsubscribe** to stop getting email notifications from this discussion. diff --git a/_includes/activity/intro-to-github/03-create-branch.md b/_includes/activity/intro-to-github/03-create-branch.md deleted file mode 100644 index c595f8be6..000000000 --- a/_includes/activity/intro-to-github/03-create-branch.md +++ /dev/null @@ -1,6 +0,0 @@ -It is time to create the branch you will use to add your pin to the map. Here's how you do it: - -1. Navigate to the Code tab in the class repository. -2. Click the drop-down titled `master`. -3. In the field, enter this unique name for your branch: ``. -4. Press Enter to create your branch. diff --git a/_includes/activity/intro-to-github/04-create-a-file-on-github.md b/_includes/activity/intro-to-github/04-create-a-file-on-github.md deleted file mode 100644 index 892da4cc6..000000000 --- a/_includes/activity/intro-to-github/04-create-a-file-on-github.md +++ /dev/null @@ -1,14 +0,0 @@ -It's time to add your file to the repository: - -1. In your new branch, add a new file named: `_pins/YOUR-USERNAME.json`. -1. Enter the following content into your file: - - --- - githubHandle: YOUR-USERNAME - latitude: YOUR_LATITUDE - longitude: YOUR_LONGITUDE - --- - - -1. Scroll down and enter a commit message that describes your addition. -1. Commit your change to your branch. diff --git a/_includes/activity/intro-to-github/05-create-a-pull-request.md b/_includes/activity/intro-to-github/05-create-a-pull-request.md deleted file mode 100644 index e18f92c44..000000000 --- a/_includes/activity/intro-to-github/05-create-a-pull-request.md +++ /dev/null @@ -1,18 +0,0 @@ -Now that you have created a file, you will create a Pull Request to show your proposed changes to others who are completing this project: - -1. Navigate to the Pull Requests tab. -2. Click `New Pull Request`. -3. In the *base* dropdown, choose `master`. -4. In the *compare* dropdown, choose your branch. -5. Click `Create Pull Request` -6. You can leave the default title or make it more descriptive. -7. Use [markdown formatting](https://guides.github.com/features/mastering-markdown/) to explain the work you have done on your branch. - - Summarize your proposed change. - - Mention the training team using `@githubteacher`. - - Use the keywords `closes` immediately followed by your issue number (e.g. `closes #3`)to note which Issue the Pull Request is addressing. When you do this, the issue will be automatically closed when the pull request is merged. - - > Pull Request messages are an excellent opportunity for you to describe the changes you have made to the project. For example, you could also include information explaining the type of feedback you'd like others to give you or providing collaborators an idea of your timeline. - -8. Click *Preview* to see how your Pull Request will look. -9. Assign the pull request to yourself by clicking `assign to yourself` in the Assignees section. -10. Click `Create Pull Request`. diff --git a/_includes/activity/intro-to-github/05a-collaborate-on-pull-request.md b/_includes/activity/intro-to-github/05a-collaborate-on-pull-request.md deleted file mode 100644 index a01b5f703..000000000 --- a/_includes/activity/intro-to-github/05a-collaborate-on-pull-request.md +++ /dev/null @@ -1,4 +0,0 @@ -:tada: Congratulations! You have created your Pull Request. Now it is time to put your collaborator hat on and go help others! - -1. Now that your pull request has been created, go back to the pull request list to find an open pull request -- other than your own. -1. Provide feedback :loudspeaker: and motivation :tada:. diff --git a/_includes/activity/intro-to-github/06-merge-a-pr.md b/_includes/activity/intro-to-github/06-merge-a-pr.md deleted file mode 100644 index be38960ec..000000000 --- a/_includes/activity/intro-to-github/06-merge-a-pr.md +++ /dev/null @@ -1,7 +0,0 @@ -If all of your checks are passing and you do not have any requested changes from other students, you can go ahead and merge your pull request: - -1. Open your [Pull Request](https://github.com/githubschool/open-enrollment-classes-introduction-to-github/pulls) to be merged. -1. Scroll to the bottom of the Pull Request and click the **Merge pull request** button. -1. You can accept the default merge commit message. -1. Click **Confirm merge**. -1. Delete the branch, as it no longer contains unique work. diff --git a/_includes/analytics-providers/custom.html b/_includes/analytics-providers/custom.html deleted file mode 100644 index c34b97ad9..000000000 --- a/_includes/analytics-providers/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/_includes/analytics-providers/google-universal.html b/_includes/analytics-providers/google-universal.html deleted file mode 100644 index 3ada6e36c..000000000 --- a/_includes/analytics-providers/google-universal.html +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/_includes/archive-single.html b/_includes/archive-single.html deleted file mode 100644 index ee46c724f..000000000 --- a/_includes/archive-single.html +++ /dev/null @@ -1,34 +0,0 @@ -{% include base_path %} - -{% if post.header.teaser %} - {% capture teaser %}{{ post.header.teaser }}{% endcapture %} -{% else %} - {% capture teaser %}{{ site.teaser }}{% endcapture %} -{% endif %} - - diff --git a/_includes/attention.html b/_includes/attention.html deleted file mode 100644 index e2544de10..000000000 --- a/_includes/attention.html +++ /dev/null @@ -1,7 +0,0 @@ -{% if page.attention_message %} -
-
- {{page.attention_message | markdownify}} -
-
-{% endif %} diff --git a/_includes/author-profile.html b/_includes/author-profile.html deleted file mode 100644 index 5efe4c84b..000000000 --- a/_includes/author-profile.html +++ /dev/null @@ -1,102 +0,0 @@ -{% include base_path %} - -{% if page.author %} - {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.author %} -{% endif %} - -
- -
- {% if author.avatar contains "://" %} - {{ author.name }} - {% else %} - {{ author.name }} - {% endif %} -
- -
-

{{ author.name }}

- {% if author.bio %}

{{ author.bio }}

{% endif %} -
- -
- - -
-
diff --git a/_includes/breadcrumbs.html b/_includes/breadcrumbs.html index ded8bd6e0..79d242a64 100644 --- a/_includes/breadcrumbs.html +++ b/_includes/breadcrumbs.html @@ -1,5 +1,3 @@ -{% include base_path %} - {% case site.categories.type %} {% when "liquid" %} {% assign path_type = "#" %} @@ -14,28 +12,44 @@ {% assign crumb_path = site.categories.path %} {% endif %} - diff --git a/_includes/browser-upgrade.html b/_includes/browser-upgrade.html deleted file mode 100644 index e8d8b2625..000000000 --- a/_includes/browser-upgrade.html +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/_includes/category-list.html b/_includes/category-list.html deleted file mode 100644 index 5b79aef72..000000000 --- a/_includes/category-list.html +++ /dev/null @@ -1,30 +0,0 @@ -{% include base_path %} - -{% include base_path %} - -{% case site.category_archive.type %} - {% when "liquid" %} - {% assign path_type = "#" %} - {% when "jekyll-archives" %} - {% assign path_type = nil %} -{% endcase %} - -{% if site.category_archive.path %} - {% comment %} - - - {% endcomment %} - {% capture page_categories %}{% for category in page.categories %}{{ category | downcase }}#{{ category }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} - {% assign category_hashes = (page_categories | split: ',' | sort:0) %} - -

- {{ site.data.ui-text[site.locale].categories_label }} - - {% for hash in category_hashes %} - {% assign keyValue = hash | split: '#' %} - {% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %} - {% unless forloop.last %}, {% endunless %} - {% endfor %} - -

-{% endif %} diff --git a/_includes/comments-providers/custom.html b/_includes/comments-providers/custom.html deleted file mode 100644 index 90993691e..000000000 --- a/_includes/comments-providers/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/_includes/comments-providers/discourse.html b/_includes/comments-providers/discourse.html deleted file mode 100644 index 1d23b6f21..000000000 --- a/_includes/comments-providers/discourse.html +++ /dev/null @@ -1,14 +0,0 @@ -{% if site.comments.discourse.server %} -{% include base_path %} -{% capture canonical %}{{ base_path }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} - - -{% endif %} \ No newline at end of file diff --git a/_includes/comments-providers/disqus.html b/_includes/comments-providers/disqus.html deleted file mode 100644 index b80be9efd..000000000 --- a/_includes/comments-providers/disqus.html +++ /dev/null @@ -1,22 +0,0 @@ -{% if site.comments.disqus.shortname %} - - -{% endif %} diff --git a/_includes/comments-providers/facebook.html b/_includes/comments-providers/facebook.html deleted file mode 100644 index 009dc1c6c..000000000 --- a/_includes/comments-providers/facebook.html +++ /dev/null @@ -1,8 +0,0 @@ -
- \ No newline at end of file diff --git a/_includes/comments-providers/google-plus.html b/_includes/comments-providers/google-plus.html deleted file mode 100644 index cd582c3dd..000000000 --- a/_includes/comments-providers/google-plus.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/_includes/comments.html b/_includes/comments.html deleted file mode 100644 index 03a8c64cf..000000000 --- a/_includes/comments.html +++ /dev/null @@ -1,15 +0,0 @@ -{% include base_path %} - -
-

{{ site.data.ui-text[site.locale].comments_label }}

- {% case site.comments.provider %} - {% when "disqus" %} -
- {% when "facebook" %} -
- {% when "google-plus" %} -
Loading Google+ Comments ...
- {% when "custom" %} -
- {% endcase %} -
\ No newline at end of file diff --git a/_includes/feature_row b/_includes/feature_row deleted file mode 100644 index 02942fa99..000000000 --- a/_includes/feature_row +++ /dev/null @@ -1,60 +0,0 @@ -{% include base_path %} - -{% if include.id %} - {% assign feature_row = page.[include.id] %} -{% else %} - {% assign feature_row = page.feature_row %} -{% endif %} - -
- - {% for f in feature_row %} - - {% if f.url contains "://" %} - {% capture f_url %}{{ f.url }}{% endcapture %} - {% else %} - {% capture f_url %}{{ f.url | prepend: base_path }}{% endcapture %} - {% endif %} - -
-
- {% if f.image_path %} -
- {% if f.alt %}{{ f.alt }}{% endif %} -
- {% endif %} - - - {% if f.icon %} -
- -
- {% endif %} - - -
- {% if f.title %} -

{{ f.title }}

- {% endif %} - - {% if f.excerpt %} -
- {{ f.excerpt | markdownify }} -
- {% endif %} - - {% if f.url %} -

{{ f.btn_label | default: site.data.ui-text[site.locale].more_label }}

- {% endif %} -
-
-
- {% endfor %} - -
diff --git a/_includes/footer.html b/_includes/footer.html index d594cd8f2..c76945977 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,24 +1,18 @@ -{% include base_path %} + diff --git a/_includes/footer/custom.html b/_includes/footer/custom.html deleted file mode 100644 index d512599d1..000000000 --- a/_includes/footer/custom.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/_includes/gallery b/_includes/gallery deleted file mode 100644 index e9260086d..000000000 --- a/_includes/gallery +++ /dev/null @@ -1,51 +0,0 @@ -{% include base_path %} - -{% if include.id %} - {% assign gallery = page.[include.id] %} -{% else %} - {% assign gallery = page.gallery %} -{% endif %} - -{% capture gallery_size %}{{ gallery | size }}{% endcapture %} - -{% if gallery_size == '2' %} - {% assign gallery_layout = 'half' %} -{% elsif gallery_size >= '3' %} - {% assign gallery_layout = 'third' %} -{% else %} - {% assign gallery_layout = '' %} -{% endif %} - - diff --git a/_includes/ghflow-steps/02-add-commits.md b/_includes/ghflow-steps/02-add-commits.md deleted file mode 100644 index 97d14c4d7..000000000 --- a/_includes/ghflow-steps/02-add-commits.md +++ /dev/null @@ -1,9 +0,0 @@ -## Understanding the GitHub Flow - -Add and commit files on the command line. - -1. :white_check_mark: Create a branch -1. **Add commits** :arrow_left: _(This section deals with this step.)_ -1. Open a Pull Request -1. Collaborate, and make more commits -1. Merge the Pull Request diff --git a/_includes/group-by-array b/_includes/group-by-array deleted file mode 100644 index 251302c70..000000000 --- a/_includes/group-by-array +++ /dev/null @@ -1,47 +0,0 @@ - - - -{% assign __empty_array = '' | split: ',' %} -{% assign group_names = __empty_array %} -{% assign group_items = __empty_array %} - - -{% assign __names = include.collection | map: include.field %} - - -{% assign __names = __names | join: ',' | join: ',' | split: ',' %} - - -{% assign __names = __names | sort %} -{% for name in __names | sort %} - - -{% unless name == previous %} - - -{% assign group_names = group_names | push: name %} -{% endunless %} - -{% assign previous = name %} -{% endfor %} - - - -{% for name in group_names %} - - -{% assign __item = __empty_array %} -{% for __element in include.collection %} -{% if __element[include.field] contains name %} -{% assign __item = __item | push: __element %} -{% endif %} -{% endfor %} - - -{% assign group_items = group_items | push: __item %} -{% endfor %} \ No newline at end of file diff --git a/_includes/head.html b/_includes/head.html index a28ce9a02..45fff1b8d 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,21 +1,10 @@ -{% include base_path %} + + + + + + - + {% include seo.html %} -{% include seo.html %} - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/_includes/head/custom.html b/_includes/head/custom.html deleted file mode 100644 index 8eecc32f6..000000000 --- a/_includes/head/custom.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 000000000..6b69d5533 --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,27 @@ +{% if page.lang %} + {% assign lang = page.lang %} +{% else %} + {% assign lang = "en" %} +{% endif %} +{% assign nav = site.data.navigation["main"][lang] %} + +
+ +
diff --git a/_includes/help-build-fail.md b/_includes/help-build-fail.md deleted file mode 100644 index 93bfcf473..000000000 --- a/_includes/help-build-fail.md +++ /dev/null @@ -1,34 +0,0 @@ -## Help: My Build Failed - -The class repository is using continuous integration through [Travis CI](https://travis-ci.org) to run tests on the code you have entered. To put it simply, it is checking to make sure the syntax is correct in your file. - -The files we are using are very picky. If you made any mistakes, you will see a message that your build has failed. This usually means that the text you entered is incorrect. Check the syntax carefully against the instructions and edit your file as needed. - -When you commit your changes, Travis CI will re-check your file. - -Keep doing this until you see a message that the build has passed. If you need help, don't forget you can find us in chat or @ mention `@githubteacher` in your pull request. - -### Help With Specific Issues - -The build can fail because of many reasons. By looking at the details of the **Travis CI** log it might help you to troubleshoot your code. - -1. Open the _Pull request_ -2. Go to the bottom to the "merge" icon to the section where it says 'checks have failed'. - Here you'll see a lot of :x:. Not good. -3. Open the `Details` - -The build log of Travis CI may appear a little cryptic. But with some careful reading you might be able to pull out the reason why your build is failing. (By the way, if you think the `job log` is cryptic, try and click on the `Raw log`.) - -The build script is a series of commands. It might be helpful to know that **every new command starts with a `$` sign**. Such commands can be something simple or a new (sub)script. The individual properties of your _branch_ are tested in individual scripts. For example, **Travis CI** very early on tests whether your file is formatted as an appropriate "`.yaml` file". - -#### 404 error -Somewhere down the cascade of tests **Travis CI** will check if the URL following `pageUrl` actually exists. The test and the complete build will fail if a website does not exist (a "404 error"). - -It is possible you might have mistyped your URL or something went wrong when you tried to publish your website. It is also possible that users who previously merged their branch with the master have sadly deleted their repository and their website disappeared. - -Try and discover in the log which URL is causing a 404 error. You can double check whether the website exist by copying it into your browser. - -Because you are working in your own branch it is safe to change the code however you like. If you see something that can be fixed easily you could just edit the offending file. For instance you can replace the broken URL with something that does exist (e.g. `github.com`). -A more rigorous solution would be to delete the file altogether. - -Once your fix is correct and the build is no longer failing, you are ready to merge your branch with the `master`. You might get some merge conflicts you will need to address first. Ask `@githubteacher` if you get stuck. diff --git a/_includes/help-other-things.md b/_includes/help-other-things.md deleted file mode 100644 index 1827a7670..000000000 --- a/_includes/help-other-things.md +++ /dev/null @@ -1,7 +0,0 @@ -## Help: Something is Wrong - -This is a busy repository with a lot of contributors. If you see a different message, check the troubleshooting guide below: - -| Message | What to do? | -| -------- | ---------- | -| **This branch has conflicts and cannot be merged** | This message is telling you that someone has made a change to master that conflicts with the changes you made in your file. We don't cover merge conflicts in this class so @ mention githubteacher from your Pull Request and we will help you get it resolved! | diff --git a/_includes/icon-sm-git.svg b/_includes/icon-sm-git.svg new file mode 100644 index 000000000..93c52a032 --- /dev/null +++ b/_includes/icon-sm-git.svg @@ -0,0 +1 @@ +icon-sm-git diff --git a/_includes/icon-sm-migration.svg b/_includes/icon-sm-migration.svg new file mode 100644 index 000000000..c2eba07a4 --- /dev/null +++ b/_includes/icon-sm-migration.svg @@ -0,0 +1 @@ +icon-sm-migration diff --git a/_includes/intro-video.html b/_includes/intro-video.html deleted file mode 100644 index 6fe9f0a13..000000000 --- a/_includes/intro-video.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/_includes/lab b/_includes/lab deleted file mode 100644 index 9fe5e95de..000000000 --- a/_includes/lab +++ /dev/null @@ -1,6 +0,0 @@ -
-
Lab
-
- {{ lab | markdownify }} -
-
diff --git a/_includes/light-hero.html b/_includes/light-hero.html new file mode 100644 index 000000000..a48f6b507 --- /dev/null +++ b/_includes/light-hero.html @@ -0,0 +1,9 @@ +
+
+

{{ page.title }}

+ {% if page.description %} +

{{ page.description }}

+ {% endif %} + {% include translation_buttons.html %} +
+
diff --git a/_includes/logo-github-services.svg b/_includes/logo-github-services.svg deleted file mode 100644 index e6186d742..000000000 --- a/_includes/logo-github-services.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/_includes/manual/09a-merge-explained.md b/_includes/manual/09a-merge-explained.md deleted file mode 100644 index b1a6098af..000000000 --- a/_includes/manual/09a-merge-explained.md +++ /dev/null @@ -1,21 +0,0 @@ -## Merge Explained - -When you merge your branch, you are taking the content and history from the branch you created and adding it to the content and history of the `master` branch. - -![Merge visual]({{site.baseurl}}/images/merge-visual.jpg) - -### Tips for Merging with Teams - -Many project teams have established rules about who should (or shouldn't) merge a pull request: - -- Some say it should be the person who created the pull request since they will be the ones to deal with any issues resulting from the merge. -- Others say it should be a single person within the project team to ensure consistency. -- Still others say it can be anyone other than the person who created the pull request. - -This is a discussion you should have with the other members of your team. For today, you should only merge your own pull request. - -## When to Merge - -Most teams also have processes to help others know when it is OK to merge. At GitHub, we like to use emoji to indicate we have checked over the Pull Request and it looks good to merge. We like to use :+1:, :ship:, or :shipit: (`:+1:`, `:ship:`, and `:shipit:`). - -{: .notice--info} diff --git a/_includes/masthead.html b/_includes/masthead.html deleted file mode 100644 index 5462e7cdd..000000000 --- a/_includes/masthead.html +++ /dev/null @@ -1,23 +0,0 @@ -{% include base_path %} - - diff --git a/_includes/nav_list b/_includes/nav_list deleted file mode 100644 index ff11c46a7..000000000 --- a/_includes/nav_list +++ /dev/null @@ -1,52 +0,0 @@ -{% include base_path %} -{% assign navigation = site.data.navigation[include.nav] %} - - diff --git a/_includes/page__hero.html b/_includes/page__hero.html deleted file mode 100644 index ab7ff154e..000000000 --- a/_includes/page__hero.html +++ /dev/null @@ -1,55 +0,0 @@ -{% include base_path %} - -{% if page.header.image contains "://" %} - {% capture img_path %}{{ page.header.image }}{% endcapture %} -{% else %} - {% capture img_path %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endcapture %} -{% endif %} - -{% if page.header.cta_url contains "://" %} - {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} -{% else %} - {% capture cta_path %}{{ page.header.cta_url | prepend: base_path }}{% endcapture %} -{% endif %} - -{% if page.header.overlay_image contains "://" %} - {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} -{% elsif page.header.overlay_image %} - {% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/images/" | prepend: base_path }}{% endcapture %} -{% endif %} - -{% if page.header.overlay_filter contains "rgba" %} - {% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %} -{% elsif page.header.overlay_filter %} - {% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %} -{% endif %} - -
- {% if page.header.overlay_color or page.header.overlay_image %} -
-

- {% if paginator %} - {{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page }} {{ paginator.page }}{% endunless %} - {% else %} - {{ page.title | default: site.title | markdownify | remove: "

" | remove: "

" }} - {% endif %} -

- {% if page.excerpt %} -

{{ page.excerpt | markdownify | remove: "

" | remove: "

" }}

- {% endif %} - {% if site.read_time and page.read_time %} -

{% include read-time.html %}

- {% endif %} - {% if page.header.cta_url %} -

{{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label }}

- {% endif %} -
- {% else %} - {{ page.title }} - {% endif %} - {% if page.header.caption %} - {{ page.header.caption | markdownify | remove: "

" | remove: "

" }}
- {% endif %} -
diff --git a/_includes/page__taxonomy.html b/_includes/page__taxonomy.html deleted file mode 100644 index 812b79d89..000000000 --- a/_includes/page__taxonomy.html +++ /dev/null @@ -1,9 +0,0 @@ -{% include base_path %} - -{% if site.tag_archive.type and page.tags[0] %} - {% include tag-list.html %} -{% endif %} - -{% if site.category_archive.type and page.categories[0] %} - {% include category-list.html %} -{% endif %} diff --git a/_includes/paginator.html b/_includes/paginator.html deleted file mode 100644 index 92450bbda..000000000 --- a/_includes/paginator.html +++ /dev/null @@ -1,70 +0,0 @@ -{% include base_path %} - -{% if paginator.total_pages > 1 %} - -{% endif %} \ No newline at end of file diff --git a/_includes/post_pagination.html b/_includes/post_pagination.html deleted file mode 100644 index 0a3acac59..000000000 --- a/_includes/post_pagination.html +++ /dev/null @@ -1,16 +0,0 @@ -{% include base_path %} - -{% if page.previous or page.next %} - -{% endif %} \ No newline at end of file diff --git a/_includes/read-time.html b/_includes/read-time.html deleted file mode 100644 index 86e7db842..000000000 --- a/_includes/read-time.html +++ /dev/null @@ -1,13 +0,0 @@ -{% if post.read_time %} - {% assign words = post.content | strip_html | number_of_words %} -{% elsif page.read_time %} - {% assign words = page.content | strip_html | number_of_words %} -{% endif %} - -{% if words < 180 %} - {{ site.data.ui-text[site.locale].less_than }} 1 {{ site.data.ui-text[site.locale].minute_read }} -{% elsif words < 360 %} - 1 {{ site.data.ui-text[site.locale].minute_read }} -{% else %} - {{ words | divided_by:site.words_per_minute }} {{ site.data.ui-text[site.locale].minutes_read }} -{% endif %} \ No newline at end of file diff --git a/_includes/refresh/github-CLI/create-pr.md b/_includes/refresh/github-CLI/create-pr.md deleted file mode 100644 index 52888db89..000000000 --- a/_includes/refresh/github-CLI/create-pr.md +++ /dev/null @@ -1,11 +0,0 @@ - -## Create a Pull Request - -1. After pushing your local changes to your remote repository, point your browser to your repository on Github.com. -1. Click the **Pull Requests** tab. -1. Click the **New pull request** button. -1. Ensure the **base:** dropdown displays **master**. -1. Click the **compare:** dropdown and select the branch you recently pushed to the repository. -1. Click the **Create pull request** button. -1. Modify the **Title** and **Description** of the Pull Request to identify the changes this Pull Request is introducing to the master branch and your repository. - diff --git a/_includes/refresh/github-CLI/local-review.md b/_includes/refresh/github-CLI/local-review.md deleted file mode 100644 index b3b8ed8ac..000000000 --- a/_includes/refresh/github-CLI/local-review.md +++ /dev/null @@ -1,33 +0,0 @@ -### Cloning the Repository - -1. Navigate to the Code tab of the class repository. -1. Click **Clone or download** -1. Copy the **Clone URL** provided. -1. Open your terminal and `cd` into the directory where you would like to copy the repository. **Pro Tip:** Type `cd ..` to go up one level from your website repository. -1. Type `git clone URL`. Be sure to replace `URL` with the Clone URL you copied in the previous step. -1. Type `cd REPOSITORY-NAME` to move into the directory of the repository you just cloned. - -### Create a Branch - -1. Create a branch using the shortcut command `git checkout -b BRANCH-NAME` Something like `yourUsername-add-page` is a perfect branch name. - -### Add the File - -1. In your favorite text editor, add a file to the `_pages` directory. Include your GitHub handle in the filename: `username.yaml`. -1. Enter the following content into your file: - - --- - githubHandle: YOUR-USERNAME - pageUrl: YOUR-SITES-URL - timestamp: TODAYS-DATE-YYYY-MM-DD - --- - -10. Ensure you've replaced `YOUR-USERNAME` with your GitHub Username, `YOUR-SITES-URL` with the URL to your site (which should be `YOUR-USERNAME.github.io`), and `TODAYS-DATE-YYYY-MM-DD` with today's date, using a 4-digit year, 2-digit month, and 2-digit day. For example, if today is October 17, 2016, you would enter: `2016-10-17`. - -### Commit the Changes - -11. Go back to the command line and type `git status`. -12. Add your file to the staging area: `git add FILENAME`. -13. Type `git status`. -14. Commit your changes: `git commit -m "describe your changes"`. -15. Type `git status` to ensure your work was committed. diff --git a/_includes/refresh/github-CLI/pull-request.md b/_includes/refresh/github-CLI/pull-request.md deleted file mode 100644 index d1de9e056..000000000 --- a/_includes/refresh/github-CLI/pull-request.md +++ /dev/null @@ -1,12 +0,0 @@ -### Push Your Branch - -1. To push your local commits to the remote, use the following command: `git push -u origin BRANCH-NAME` -1. Open your preferred web browser and access `https://github.com/githubschool/on-demand-github-pages/`. - -### Create a Pull Request - -1. Click the *Pull Requests* tab. -1. Click the *New pull request* button. -1. Click the `compare:` drop-down and select your branch. -1. Click the *Create pull request* button. -1. Modify the 'title' and 'body' of the Pull Request to identify the changes you are proposing. diff --git a/_includes/scripts.html b/_includes/scripts.html deleted file mode 100644 index 3fd725839..000000000 --- a/_includes/scripts.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - -{% include analytics.html %} -{% include /comments-providers/scripts.html %} diff --git a/_includes/seo.html b/_includes/seo.html index 5674a9c7e..57704542c 100644 --- a/_includes/seo.html +++ b/_includes/seo.html @@ -38,7 +38,8 @@ {% endif %} {% assign seo_author_twitter = seo_author_twitter | replace: "@", "" %} {% endif %} - + + diff --git a/_includes/sidebar.html b/_includes/sidebar.html deleted file mode 100644 index 6135b50b1..000000000 --- a/_includes/sidebar.html +++ /dev/null @@ -1,25 +0,0 @@ -{% include base_path %} - -{% if page.author_profile or layout.author_profile or page.sidebar %} - -{% endif %} diff --git a/_includes/social-share.html b/_includes/social-share.html deleted file mode 100644 index b2842865c..000000000 --- a/_includes/social-share.html +++ /dev/null @@ -1,15 +0,0 @@ -{% include base_path %} - - \ No newline at end of file diff --git a/_includes/tag-list.html b/_includes/tag-list.html deleted file mode 100644 index f942c3292..000000000 --- a/_includes/tag-list.html +++ /dev/null @@ -1,28 +0,0 @@ -{% include base_path %} - -{% case site.tag_archive.type %} - {% when "liquid" %} - {% assign path_type = "#" %} - {% when "jekyll-archives" %} - {% assign path_type = nil %} -{% endcase %} - -{% if site.tag_archive.path %} - {% comment %} - - - {% endcomment %} - {% capture page_tags %}{% for tag in page.tags %}{{ tag | downcase }}#{{ tag }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} - {% assign tag_hashes = (page_tags | split: ',' | sort:0) %} - -

- {{ site.data.ui-text[site.locale].tags_label }} - - {% for hash in tag_hashes %} - {% assign keyValue = hash | split: '#' %} - {% capture tag_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %} - {% unless forloop.last %}, {% endunless %} - {% endfor %} - -

-{% endif %} diff --git a/_includes/tell-me-why/branching.md b/_includes/tell-me-why/branching.md deleted file mode 100644 index a3cd64e69..000000000 --- a/_includes/tell-me-why/branching.md +++ /dev/null @@ -1,19 +0,0 @@ -[//]: # "This is used in both the CLI and Desktop course" - -## Reviewing the GitHub Flow - -Remember, we used the GitHub Flow in [Introduction to GitHub](https://github.github.com/on-demand/intro-to-github/), and we use it again here! :smile: - -The main steps of the GitHub workflow are: - -1. **Create a branch** :arrow_left: _(This section deals with this step.)_ -1. Add commits -1. Open a Pull Request -1. Collaborate, and make more commits -1. Merge the Pull Request - -You learned how to create a branch in the Introduction course, too. But this time, we will do it in the local repository. - -When you create a local branch, it will persist regardless of how you decide to work with your files. - -Feel free to use your favorite text editor or IDE to work with your files. Rest assured that you will only be making changes on the branch you have selected. diff --git a/_includes/tell-me-why/clone-repo.md b/_includes/tell-me-why/clone-repo.md deleted file mode 100644 index c3ea8eae1..000000000 --- a/_includes/tell-me-why/clone-repo.md +++ /dev/null @@ -1,8 +0,0 @@ -## Cloning a Repository -1. Navigate to your repository on [GitHub.com](https://www.github.com). - - If you just created the repository, you are already there! -1. On the Code tab, click the **Clone or download** button. -1. Copy the **Clone with HTTPS** web url. -1. Open a terminal application and navigate to a location on your local machine where you want the course repository to go. -1. Enter: `git clone URL`, where URL is the web url you copied from your repository. This clones your repository to your local machine! -1. Enter: `cd REPONAME`, where REPONAME is the name of the repository you just cloned to your machine. diff --git a/_includes/tell-me-why/collaborate.md b/_includes/tell-me-why/collaborate.md deleted file mode 100644 index a7eb0a3be..000000000 --- a/_includes/tell-me-why/collaborate.md +++ /dev/null @@ -1,16 +0,0 @@ -[//]: # "This is used in both the CLI and Desktop course" - -## Reviewing the GitHub Flow - - -1. :white_check_mark: Create a branch -1. :white_check_mark: Add commits -1. :white_check_mark: Open a Pull Request -1. **Collaborate, and make more commits** :arrow_left: _(This section deals with this step.)_ -1. Merge the Pull Request - -## Understanding Continuous Integration - -Our class repository uses continuous integration (CI) to ensure that the files being added conform to certain guidelines. For example, our tests are checking to ensure you have formatted the file correctly and placed it in the correct directory within the repository. - -If the tests do not pass on your Pull Request, you will be unable to merge until you have fixed the problem. For help, see the **Help me troubleshoot** section above. diff --git a/_includes/tell-me-why/create-file-locally.md b/_includes/tell-me-why/create-file-locally.md deleted file mode 100644 index 8ba3af3d9..000000000 --- a/_includes/tell-me-why/create-file-locally.md +++ /dev/null @@ -1,7 +0,0 @@ -[//]: # "This is used in both the CLI and Desktop course" - -## Your First Website - -For this activity, we are focusing on the steps for working with a repository with GitHub.com and your local environment. If you are not familiar with web design, that's ok. These instructions will create a very basic, unformatted page. - -There are several tools you can use in combination with GitHub Pages to create a beautiful website. For example, you can download one of the themes on [http://jekyllthemes.org/](http://jekyllthemes.org/) or you can create a regular HTML page. The possibilities are endless! diff --git a/_includes/tell-me-why/create-issue.md b/_includes/tell-me-why/create-issue.md deleted file mode 100644 index e8b5de6d8..000000000 --- a/_includes/tell-me-why/create-issue.md +++ /dev/null @@ -1,20 +0,0 @@ -## Using GitHub Issues - -GitHub _Issues_ are used to record and discuss ideas, enhancements, tasks, and bugs. They make collaboration easier by: - -- Replacing email for project discussions, ensuring everyone on the team (even your future team member) has the complete story. -- Allowing you to cross-link to other _Issues_ and _Pull requests_. -- Creating a single, comprehensive record of how and why you made certain decisions. -- Allowing you to easily pull the right people into a conversation with @ mentions and team mentions. - -To learn more about _issues_, check out this video: - - - -## Why Did We Ask You to Create an _Issue_? - -When you sign up for GitHub, you automatically have **Read only access** to any public repository. This means you can look around, comment on _Issues_ and _Pull Requests_, and open new _Issues_ to report bugs or request features on your favorite projects. You can also create repositories on your own account! - -However, you can not make changes directly on someone else's project unless you use a special workflow (called "Fork" and "Pull") or they give you **collaborator access**. - -For this repository, we have created a webhook that adds you as a collaborator when you create an _Issue_. If you completed the steps above, you are ready to be a collaborator on our project! diff --git a/_includes/tell-me-why/create-remote.md b/_includes/tell-me-why/create-remote.md deleted file mode 100644 index f791a45b5..000000000 --- a/_includes/tell-me-why/create-remote.md +++ /dev/null @@ -1,7 +0,0 @@ -[//]: # "This is used in both the CLI and Desktop course" - -## Repositories - -When you create a new repository, you're creating a project. For this project, you'll create a web page using GitHub Pages. - -When you create your own repository, you will be the owner. This means you'll have administrative and write access. diff --git a/_includes/tell-me-why/create-repo.md b/_includes/tell-me-why/create-repo.md deleted file mode 100644 index 71d132f85..000000000 --- a/_includes/tell-me-why/create-repo.md +++ /dev/null @@ -1,7 +0,0 @@ -## Creating a Repository -1. Navigate to [GitHub.com](https://www.github.com) -1. Click the **New repository** button. -1. Enter a name for the repository in the **Repository name** field. - - You can also add a description for the repository in the **Description** field. -1. Click the **Initialize this repository with a README** checkbox. -1. Click the **Create repository** button. diff --git a/_includes/tell-me-why/git-configuration.md b/_includes/tell-me-why/git-configuration.md deleted file mode 100644 index dbf7a3425..000000000 --- a/_includes/tell-me-why/git-configuration.md +++ /dev/null @@ -1,27 +0,0 @@ -## Introducing Git Configuration - -Git uses config settings to customize your local working environment based on your preferences. You can do a lot with Git config, but we start with the basics. - -### Configuration Levels - -Git allows you to set configuration options at three different levels. - - - `--system` These are system-wide configurations. They apply to all users on this computer. - - `--global` These are the user level configurations. They only apply to your user account and will be applied to every repository you create or clone under your account. - - `--local` - These are the repository level configurations. They only apply to the specific repository where they are set. - -The default value for git config is `--local`. `--local` has precedence so setting something at the local level will override settings at global or system level. - -### What does autocrlf do? - -If you're using Git to collaborate with others on GitHub, ensure that Git is properly configured to handle line endings. - -Every time you press return on your keyboard you're actually inserting an invisible character called a line ending. Historically, different operating systems have handled line endings differently. - -When you view changes in a file, Git handles line endings in its own way. Since you're collaborating on projects with Git and GitHub, Git might produce unexpected results if, for example, you're working on a Windows machine, and your collaborator has made a change in OS X. - -For more information about autocrlf, see the [GitHub Help documentation](https://help.github.com/articles/dealing-with-line-endings/). - -### Taking Git Config Further - -For more information on customizing Git with git config, check out [this chapter from ProGit](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration). diff --git a/_includes/tell-me-why/github-pages.md b/_includes/tell-me-why/github-pages.md deleted file mode 100644 index dc12e5c8e..000000000 --- a/_includes/tell-me-why/github-pages.md +++ /dev/null @@ -1,13 +0,0 @@ -[GitHub Pages](https://pages.github.com) is a free service that lets you host a website directly from your GitHub repository. - -## Enabling GitHub Pages - -Remember that funny repository name you typed when you created your repository? That funny name is special to GitHub Pages. It tells GitHub Pages that you want to publish the content on the `master` branch of this repository as a web page. - -Technically speaking, any GitHub repository can be viewed as a website using GitHub Pages. All you need to do is access the repository settings and enable pages. - -### Learn More About GitHub Pages - -Check out this fun, 4 minute video to learn more about GitHub Pages: - - diff --git a/_includes/tell-me-why/local-remote.md b/_includes/tell-me-why/local-remote.md deleted file mode 100644 index 196b661f0..000000000 --- a/_includes/tell-me-why/local-remote.md +++ /dev/null @@ -1,11 +0,0 @@ -[//]: # "This is used in both the CLI and Desktop course" - -## Remote vs. Local Repositories - -Let's take a moment to define a couple of important terms: - -A **remote** repository is the copy of your project that is housed on GitHub.com. You access this copy through a unique URL. - -A **local** repository is a copy of the remote repository that you have "cloned" to your computer. This copy includes all of the files, history, and branches in your project. - -In this class, you will make changes to this local repository and then sync them with the copy of your project on GitHub.com. diff --git a/_includes/tell-me-why/manage-notifications.md b/_includes/tell-me-why/manage-notifications.md deleted file mode 100644 index 71133b92c..000000000 --- a/_includes/tell-me-why/manage-notifications.md +++ /dev/null @@ -1,33 +0,0 @@ -##Managing Notifications -Once you've commented on an _issue_ or _pull request_, email notifications will start to pour in. By default, notifications will be sent by email when there is activity in the thread. -You can also choose to receive notifications of a full repository. Whenever there is a new _issue_, _pull request_ or _comment_ posted you will get a notification. - -###You can silence or unmute notifications of _individual issues and pull requests_. - -1. Go to the issue or pull request. -2. Click the _(Un)subscribe_ button on the right, under _Notifications_ -Underneath the button a short description explains the current notification status. - -###You can _customize_ notifications in Settings. - -1. Go to your profile icon -2. Go to _Settings_ -3. Select _Notifications_ from the menu on the left. -Here you can adjust your notification [preferences](https://help.github.com/articles/managing-notification-delivery-methods/). - -###You can choose to receive notifications from a _repository_. - -* _**Watch**_ : You will receive a notifications when a **new** _issue_, _pull request_ or _comment_ is posted, and when an _issue_ is **closed** or a _pull request_ is **merged**. -* _**Not watching**_ : Stop receiving notifications, but @ mentions will still alert you. -* _**Ignore**_ : Stops all notifications. - -###You can _review notifications_ for the repositories you are already watching. - -1. Go to your profile icon -2. Go to _settings_ -3. Select _Notification_ from the menu on the left. -4. Click on the [repositories you’re watching](https://github.com/watching) link. -5. Select the _Watching_ tab. -6. Click the _(Un)watch_ button to disable or enable notifications for that repository. - - diff --git a/_includes/tell-me-why/merge-pr.md b/_includes/tell-me-why/merge-pr.md deleted file mode 100644 index f73afc77c..000000000 --- a/_includes/tell-me-why/merge-pr.md +++ /dev/null @@ -1,15 +0,0 @@ -[//]: # "This is used in both the CLI and Desktop course" - -## Reviewing the GitHub Flow - -1. :white_check_mark: Create a branch -1. :white_check_mark: Add commits -1. :white_check_mark: Open a Pull Request -1. :white_check_mark: Collaborate, and make more commits -1. **Merge the Pull Request** :arrow_left: _(This section deals with this step.)_ - -## Congratulations! - -You've now completed all steps of [GitHub Flow](https://guides.github.com/introduction/flow/), created a website, and added it to our showcase! - -That's it for this course, but we hope you will come back and try one of our other courses soon! diff --git a/_includes/tell-me-why/pull-request.md b/_includes/tell-me-why/pull-request.md deleted file mode 100644 index 74a50750b..000000000 --- a/_includes/tell-me-why/pull-request.md +++ /dev/null @@ -1,11 +0,0 @@ -[//]: # "This is used in both the CLI and Desktop course" - -## Reviewing the GitHub Flow - -We are following the 5 steps of [GitHub Flow](https://guides.github.com/introduction/flow/), which are: - -1. :white_check_mark: Create a branch -2. :white_check_mark: Add commits -3. **Open a Pull Request** :arrow_left: _(This section deals with this step.)_ -4. Collaborate, and make more commits -5. Merge the Pull Request diff --git a/_includes/tell-me-why/trouble-commitamend.md b/_includes/tell-me-why/trouble-commitamend.md deleted file mode 100644 index 6d834dfa6..000000000 --- a/_includes/tell-me-why/trouble-commitamend.md +++ /dev/null @@ -1,9 +0,0 @@ -## Commit --amend - -The `commit --amend` command enables you to modify the message and contents of the _last_ commit you made. - -This can be helpful if you identify a spelling error or grammatical issue with the commit message you created or if you forgot to add some of the changes in the working directory. - -### How commit --amend Works - -`git commit --amend` will combine the changes in your staging area with the changes in the _last_ commit you made. Your text editor will also open, allowing you to edit the commit message. diff --git a/_includes/tell-me-why/trouble-pushforcewithlease.md b/_includes/tell-me-why/trouble-pushforcewithlease.md deleted file mode 100644 index 2c6cf7540..000000000 --- a/_includes/tell-me-why/trouble-pushforcewithlease.md +++ /dev/null @@ -1,5 +0,0 @@ -## Push --force-with-lease - -The `push --force` command allows you to override a branch history. This can be problematic if another collaborator pushed some commits to the branch you are working on. If you forgot to fetch the latest updates before pushing with the `--force` flag, those commits will be deleted. - -On the other hand, the less known `--force-with-lease` flag checks if you have fetched the latest updates before you decide to rewrite history, avoiding problematic situations. If there are updates to the branch you are working on, and you didn't fetch them, the `--force-with-lease` will make the push command fail. diff --git a/_includes/tell-me-why/trouble-rebase.md b/_includes/tell-me-why/trouble-rebase.md deleted file mode 100644 index faac6164c..000000000 --- a/_includes/tell-me-why/trouble-rebase.md +++ /dev/null @@ -1,27 +0,0 @@ -[//]: # "This is used in the Git Out of Trouble course" - -## Rebase - -The `git rebase` command is a powerful tool that can be used to reorder commits, edit commits, or even pick up entire branches and move them. - -### How Rebase Works - -Let's start with a fairly common use case for rebase: - -![](/on-demand/images/git-rebase-before.png){: .align-center} - - In the above image, we created a branch called `test` and did some work. The branch `test` is "based" on the first commit on `master`: `e137e`. While we were working on our `test` branch, some of our collaborators merged their work into `master`. If we want to merge in our `test` branch, git would need to **recursively** combine the history on the two branches. This recursive merge strategy would result in a new commit being made as you see below: - - ![](/on-demand/images/git-merge-recursive.png){: .align-center} - - Alternatively, you can use `rebase` to move the "base" of your `test` branch to the current tip of master: - - ![](/on-demand/images/git-rebase-after.png){: .align-center} - - As you can see from the diagram, git picked up the commits on our original test branch `a55e`, `97d6` and `1c70` and replayed the entire branch as if we had just created it from master. However, you should also notice the commits that occurred on the `test` branch have new SHA-1 hashes because the "base" commit for the branch has changed. - - If we were to merge these two branches now, git would do a **fast-forward** merge, giving us a nice linear history (without the recursive merge commit). - -### Rebase Interactive - - Rebase includes an interactive option that allows us to make changes to the commits as they are being replayed. For example, we can edit our commit messages as well as combine (squash), re-order, and even delete commits. diff --git a/_includes/tell-me-why/trouble-reset-xref.md b/_includes/tell-me-why/trouble-reset-xref.md deleted file mode 100644 index dd685a691..000000000 --- a/_includes/tell-me-why/trouble-reset-xref.md +++ /dev/null @@ -1,2 +0,0 @@ -## Reset -For more information on `git reset`, check out the 'Tell me why' section in the [Too Many (small) Commits](/on-demand/git-trouble/too-many-commits) scenario. diff --git a/_includes/tell-me-why/trouble-reset.md b/_includes/tell-me-why/trouble-reset.md deleted file mode 100644 index fce6469fe..000000000 --- a/_includes/tell-me-why/trouble-reset.md +++ /dev/null @@ -1,34 +0,0 @@ -[//]: # "This is used in the Git Out of Trouble course" - -## Reset - - `Reset` allows us to rewind our branch to look like it did at a previous point in history. - - ![](/on-demand/images/reset-visual.jpg){: .align-center} - -### How Reset Works - - When you use `git reset` you are overwriting one or more of the three trees git uses to manage your work. - - ![](/on-demand/images/two-stage-commit-a.jpg){: .align-center} - - The trees that are overwritten are determined by the mode of reset you use. - - - `--soft`: The history is overwritten to look like it did at the selected point in time, but the other two trees are untouched. This means the changes you made in the commits between the old branch tip and the new branch tip will be sitting in your staging area. - - `--mixed`: The history and the staging area are overwritten, but the working directory is untouched. This means your changes will be waiting in the working directory. **This is the default mode of reset** - - `--hard`: All three trees (history, staging, and working) are re-written to look like the repository at the selected point in time. **`--hard` can be destructive!** Modified files that have not been committed will be overwritten by a hard reset. - - ![](/on-demand/images/reset-modes.jpg){: .align-center} - -### Are They Really Gone? - - The good news is, git keeps a running log of every commit HEAD has pointed to. You can find this log with `git reflog`. - - A couple caveats though: - - - The reflog isn't pushed to the remote. So the only place you can access it is in your local repository. - - The reflog only displays activity for the last 30 - 90 days. 90 days applies to any commit that is currently part of a branch. 30 days applies to commits that are "unreachable" - in other words, they are not currently on a branch. - -## Important Reminder - - The `reset` command will change the commit history for your project which can cause problems for your collaborators if you have already pushed. Alternatively, `revert`, a command we use in other exercises, provides a non-destructive method to modify changes made to your repository and should be considered in place of reset when the commit(s) have already been pushed to the remote. diff --git a/_includes/tell-me-why/two-stage-commit.md b/_includes/tell-me-why/two-stage-commit.md deleted file mode 100644 index 8fa184f39..000000000 --- a/_includes/tell-me-why/two-stage-commit.md +++ /dev/null @@ -1,25 +0,0 @@ -## The Two Stage Commit - -After you have finished making your changes, it is time to commit them. When working from the command line, you will need to be familiar with the idea of the two stage commit. - -![](/on-demand/images/two-stage-commit-a.jpg){: .align-center} - -When you work locally, your files exist in one of four states. They are either untracked, modified, staged, or committed. - -![](/on-demand/images/two-stage-commit-b.jpg){: .align-center} - -An untracked file is one that is not currently part of the version controlled directory. These are typically new files. - -Modified files are ones that git already knows about, they have at least one other version in history. - -To add these files to version control, you will create a collection of files that represent a discrete unit of work. We build this unit in the staging area. - -![](/on-demand/images/two-stage-commit-c.jpg){: .align-center} - -When we are satisfied with the unit of work we have assembled, we will commit everything in the staging area. - -![](/on-demand/images/two-stage-commit-d.jpg){: .align-center} - -In order to make a file part of the version controlled directory we will first do a `git add` and then we will do a `git commit`. - -![](/on-demand/images/two-stage-commit-e.jpg){: .align-center} diff --git a/_includes/timeline.html b/_includes/timeline.html deleted file mode 100644 index 261d848e3..000000000 --- a/_includes/timeline.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
    -
  • -
    - -
    -
    - -
    -

    If you are looking for a quick and fun introduction to GitHub, you’ve found it. This class will get you started using GitHub in less than an hour.

    -

    -
    -
    - - -
  • -
  • -
    - -
    -
    - -
    -

    Learn how to use GitHub Desktop to copy a repository to your computer, track changes and communicate with GitHub.

    -
    -
    - -
  • -
  • -
    - -
    -
    - -
    -

    Learn how to use the Command Line to copy a repository to your computer, track changes and communicate with GitHub.

    -
    -
    - -
  • -
  • -
    - -
    -
    - -
    - BETA -

    Quick guides to git out of sticky situations.

    -
    -
    -
  • -
  • -
    - -
    -
  • -
-
-
-
- diff --git a/_includes/toc b/_includes/toc deleted file mode 100644 index 6ba831c90..000000000 --- a/_includes/toc +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/_includes/top.html b/_includes/top.html deleted file mode 100644 index 953604c86..000000000 --- a/_includes/top.html +++ /dev/null @@ -1,55 +0,0 @@ -
- -
- -
- -
- {% if page.title %} -

{{ page.title }}

- {% if page.byline %}

{{ page.byline }}

{% endif %} - {% endif %} - - - {% if page.body_class == "home" %} - - {% endif %} -
-
diff --git a/_includes/translation_buttons.html b/_includes/translation_buttons.html new file mode 100644 index 000000000..65e07faed --- /dev/null +++ b/_includes/translation_buttons.html @@ -0,0 +1,8 @@ +

+ {% assign pages=site.pages | where:"ref", page.ref | sort: 'lang' %} + {% for thispage in pages %} + {% if page.lang != thispage.lang %} + {{ site.data.ui-text[thispage.lang].name | downcase }} + {% endif %} + {% endfor %} +

diff --git a/_includes/video/COLL-01-Exploring-Repository-video.md b/_includes/video/COLL-01-Exploring-Repository-video.md deleted file mode 100644 index 3cc88d4bb..000000000 --- a/_includes/video/COLL-01-Exploring-Repository-video.md +++ /dev/null @@ -1,13 +0,0 @@ -The GitHub repository is the container that holds everything related to your project. - -### Repository Tabs - -- **Code**: The code view is where you will find the files included in the repository. These files may contain the project code, documentation, and other important files. We also call this view the root of the project. Any changes to these files will be tracked via Git version control. - -- **README.md**: The README.md is a special file that we recommend all repositories contain. GitHub looks for this file and helpfully displays it below the repository. The README should explain the project and point readers to helpful information within the project. - -- **Issues:** Issues are used to track bugs and feature requests. Issues can be assigned to specific team members and are designed to encourage discussion and collaboration. - -- **Pull Requests**:A Pull Request represents a change, such as adding, modifying, or deleting files, which the author would like to make to the repository. Pull Requests are used to resolve Issues. - -Go ahead and click around in the class repository now to familiarize yourself with its contents. diff --git a/_includes/video/COLL-02-Using-Issues-video.md b/_includes/video/COLL-02-Using-Issues-video.md deleted file mode 100644 index f9545cc1d..000000000 --- a/_includes/video/COLL-02-Using-Issues-video.md +++ /dev/null @@ -1,21 +0,0 @@ -Let's dive a little deeper into Issues. - -Here, I will create an issue titled Class Goals. Let's look at some of the special features in issues that you will use to collaborate with your team. - -GitHub uses a syntax called Markdown to help you add basic text formatting to issues. - -One of our favorite features is the @mention. When you @mention someone in an issue, they will receive a notification - even if they are not currently subscribed to the issue or watching the repository. - -You can use the preview tab to see how your comment will be rendered (meaning how GitHub will actually display your Markdown file). - -You can also add pictures by simply dragging and dropping them into the comment field, or clicking the file uploader link. - -Click the green comment button to add your comments to the discussion. - -As you can imagine, a large project can have hundreds of issues. Let's look at a few ways your project team can organize issues. - -First, you can assign issues to anyone with access to the repo. Typically, this will be the person who is currently responsible for the next step in the life of the issue. The issue assignee may change over time. - -You can also use labels to help you organize issues. GitHub comes with a number of built-in labels, but you can always delete those or add your own. As a project grows in size, using assignees and labels makes it much easier to find a specific issue. - -Filters allow you to easily search for Issues by creator, labels, assignees and more. We will continue to explore these features throughout the course. For now, let's practice creating an issue! diff --git a/_includes/video/COLL-03-Watching-Notifications-video.md b/_includes/video/COLL-03-Watching-Notifications-video.md deleted file mode 100644 index fe3cf05e9..000000000 --- a/_includes/video/COLL-03-Watching-Notifications-video.md +++ /dev/null @@ -1,17 +0,0 @@ -In addition to Issues and Pull Requests, GitHub provides many of the social features you would expect from a collaboration platform. Let's take a look at a few of these features now: - -### Managing Notifications - -- **Watch:** Watching a repository allows you to stay up to date on what is happening within that project. When you choose to watch a repository, you will receive a notification when a new issue, pull request or comment is added to the repository. You will also be notified when issues are closed and pull requests are merged. -- **Not Watching:** If you do not want to receive notifications for every action in the repository, you can choose the not watching option. But don't worry, you will still receive notifications if you are @ mentioned individually or as part of a group. You will also receive notifications if you comment on a specific conversation. -- **Ignoring:** The other option is to ignore a repository. Choose this option if you never want to get notifications from this repository. - -In addition to watching or ignoring a repository, you can use your notification settings to control the number of notifications you receive. You can choose whether to receive notifications via email or online. - -When you choose web notifications, you will receive your notifications through the web interface. - -If you are receiving too many notifications, you can use the watching tab to review all of the repositories you are currently watching and easily unwatch those you would like to stop receiving. - -Starring a repository adds it to a special list of favorite repositories. If you are just interested in a project and want to find it easily again, you should star it. You will not receive notifications about starred projects. These are more like bookmarks that make these projects easy to find. - -The explore option can help you find projects on GitHub. Use these options to explore the full range of what GitHub has to offer - or maybe even find an interesting open source project to work on! diff --git a/_includes/video/CONT-01-Understanding-GitHub-flow-video.md b/_includes/video/CONT-01-Understanding-GitHub-flow-video.md deleted file mode 100644 index 721cd2f91..000000000 --- a/_includes/video/CONT-01-Understanding-GitHub-flow-video.md +++ /dev/null @@ -1,11 +0,0 @@ -The GitHub flow is a lightweight workflow that allows you to experiment with new ideas safely, without fear of compromising a project. - -Branching is a key concept you will need to understand. Everything in GitHub lives on a branch. By convention, the "blessed" or "canonical" version of your project lives on a branch called `master`. - -When you are ready to experiment with a new feature or fix an issue, you create a new branch of the project. The branch will look exactly like `master` at first, but any changes you make will only be reflected in your branch. Such a new branch is often called a "feature" branch, and you should give yours a descriptive name. - -When you make changes to the files within the project, you will commit your changes to the feature branch. - -When you are ready to start a discussion about your changes, you will open a pull request. A pull request doesn't need to be a perfect work of art - it is meant to be a starting point that will be further refined and polished through the efforts of the project team. - -When the changes contained in the pull request are approved, the feature branch is merged onto the master branch. In the next section, you will learn how to put this GitHub workflow into practice. diff --git a/_includes/video/CONT-02-Using-branches-video.md b/_includes/video/CONT-02-Using-branches-video.md deleted file mode 100644 index d201d4a99..000000000 --- a/_includes/video/CONT-02-Using-branches-video.md +++ /dev/null @@ -1,13 +0,0 @@ -Every day you will be editing files on your project or adding new files. You don't want to take risks with the code on your master branch so you need to create a branch. - -When you create a branch, you are essentially creating an identical copy of the project at that point in time that is completely separate from the master branch. This keeps your the code on your master branch safe while you experiment and fix issues. - -Let's learn how you can create a new branch. - -Earlier you created an issue to create an introduction file. Let's create a branch that you will use to add your file: - -- You can create a branch by clicking on the branch dropdown. -- And entering a `branch name` in the text field. -- When you press `Enter`, you are automatically switched to your branch. Now, any changes you make to the files in the repository will be applied to this new branch. - -However, a word of caution. When you leave the repository and come back, notice that GitHub automatically assumes you want to see the items on the master branch. If you want to continue working on your branch, you will need to reselect it using the branch dropdown. Now you are ready to create your own branch and start adding some commits. diff --git a/_includes/video/CONT-03-Creating-pull-requests-video.md b/_includes/video/CONT-03-Creating-pull-requests-video.md deleted file mode 100644 index 2caa1619a..000000000 --- a/_includes/video/CONT-03-Creating-pull-requests-video.md +++ /dev/null @@ -1,26 +0,0 @@ -### Creating a Pull Request - -Pull Requests are used to propose changes to the project files. A pull request introduces an action that addresses an Issue. A Pull Request is considered a "work in progress" until it is merged into the project. Now that you have created a file, you will open a pull request to discuss the file with your team mates: - -- GitHub knows that you have added changes to your branch and helpfully recommends that you start a pull request. -- Go ahead and click the big green button to start your pull request. -- Notice that we can use the drop down here to compare any two branches. We will leave the defaults selected. -- GitHub pre-populates the commit message as the pull request title. You can change this to help your collaborators better understand the intent of the change. -- Here you can leave a comment to describe the changes you made and why. As a best practice, you should reference the original issue or issues using the # notation. -- When you are finished, choose the option to create a pull request. - -### Collaborating on Pull Requests - -Similar to the discussion thread on an Issue, a Pull Request creates a discussion about the changes being made to the repository. This discussion is found in the Conversation tab. - -The commits view contains information about who has made changes to the files. Each commit is an updated view of the repository, allowing us to see how changes have happened from commit to commit. - -The Files changed view allows you to see the change that is being proposed. We call this the `diff`. Notice that some of the text is highlighted in red. This is what has been removed. The green text is what has been added. - -If you notice something that needs to be changed, you can click on the line number in this view to create a line comment. Line level comments are a great way to give additional context on recommended changes. - -Notice that the line comment was added to the main conversation. - -If your comment is more general in nature, you can also add a comment to the Pull Request using the same method we learned for Issues. - -Most project teams require someone to sign off on the change before it is merged. We like to use emoji to show our approval. In the previous lab you created a file, next you will create a pull request for your file. diff --git a/_includes/video/CONT-04-Editing-pull-request-files-video.md b/_includes/video/CONT-04-Editing-pull-request-files-video.md deleted file mode 100644 index aa00feead..000000000 --- a/_includes/video/CONT-04-Editing-pull-request-files-video.md +++ /dev/null @@ -1,14 +0,0 @@ -Since you created the pull request, you will be notified when someone adds a comment. In this case, the comment tells us we need to make a change to the file we have already created. Let's see how GitHub makes this easy. - -### Making edits - -Let's go back to your pull request and make the edits requested by your collaborators: - -- Take a look at the change requested and then go to the files changed view. -- Click the pencil icon to access the file editor. -- Make the requested changes. -- The commit message should describe what was changed in the present tense. For example, Add favorite color. -- Since we accessed our file through the pull request, GitHub helpfully directs us to commit our changes to the same branch. -- And then click commit changes. - -If you want to see what was changed in a specific commit, you can go to the Commits tab and click on the Commit ID. Go ahead and check your own pull request now to see if you need to make any changes. diff --git a/_includes/video/CONT-05-Merging-pull-requests-video.md b/_includes/video/CONT-05-Merging-pull-requests-video.md deleted file mode 100644 index 945d5aaa5..000000000 --- a/_includes/video/CONT-05-Merging-pull-requests-video.md +++ /dev/null @@ -1,14 +0,0 @@ -Visit your pull request now that it's ready to be merged: - -- You can merge a pull request at the bottom of the conversation view. -- You simply click the Merge pull request button. -- Now we want to include some special text that tells GitHub that this pull request should close the original issue. -- Fixes is one of the special keywords that GitHub looks for in merge commits. -- We can use the # to auto-generate the link to the issue. -- Since the issue title contained your username, you can type the first few letters of your GitHub username to narrow down the list of possible issues. -- Simply select your issue from the list. -- And click confirm merge. -- A confirmation message will let you know that your pull request was merged and closed. It also let's you know that the branch we created can be safely deleted. -- Since we won't be using this branch anymore, you should go ahead and delete it now. - -You can now go back to the issues tab and you will see that your issue has been closed. Congratulations, you have completed your first contribution on GitHub. diff --git a/_javascript/bootstrap.js b/_javascript/bootstrap.js deleted file mode 100644 index 1c638ab44..000000000 --- a/_javascript/bootstrap.js +++ /dev/null @@ -1,2002 +0,0 @@ -/*! - * Bootstrap v3.0.2 by @fat and @mdo - * Copyright 2013 Twitter, Inc. - * Licensed under http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */ - -if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") } - -/* ======================================================================== - * Bootstrap: transition.js v3.0.2 - * http://getbootstrap.com/javascript/#transitions - * ======================================================================== - * Copyright 2013 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== */ - - -+function ($) { "use strict"; - - // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) - // ============================================================ - - function transitionEnd() { - var el = document.createElement('bootstrap') - - var transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd' - , 'MozTransition' : 'transitionend' - , 'OTransition' : 'oTransitionEnd otransitionend' - , 'transition' : 'transitionend' - } - - for (var name in transEndEventNames) { - if (el.style[name] !== undefined) { - return { end: transEndEventNames[name] } - } - } - } - - // http://blog.alexmaccaw.com/css-transitions - $.fn.emulateTransitionEnd = function (duration) { - var called = false, $el = this - $(this).one($.support.transition.end, function () { called = true }) - var callback = function () { if (!called) $($el).trigger($.support.transition.end) } - setTimeout(callback, duration) - return this - } - - $(function () { - $.support.transition = transitionEnd() - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: alert.js v3.0.2 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2013 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== */ - - -+function ($) { "use strict"; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector) - - if (e) e.preventDefault() - - if (!$parent.length) { - $parent = $this.hasClass('alert') ? $this : $this.parent() - } - - $parent.trigger(e = $.Event('close.bs.alert')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - $parent.trigger('closed.bs.alert').remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one($.support.transition.end, removeElement) - .emulateTransitionEnd(150) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - var old = $.fn.alert - - $.fn.alert = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') - - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: button.js v3.0.2 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2013 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== */ - - -+function ($) { "use strict"; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - } - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state = state + 'Text' - - if (!data.resetText) $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout(function () { - state == 'loadingText' ? - $el.addClass(d).attr(d, d) : - $el.removeClass(d).removeAttr(d); - }, 0) - } - - Button.prototype.toggle = function () { - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if ($parent.length) { - var $input = this.$element.find('input') - .prop('checked', !this.$element.hasClass('active')) - .trigger('change') - if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') - } - - this.$element.toggleClass('active') - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - var old = $.fn.button - - $.fn.button = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.button', (data = new Button(this, options))) - - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - $.fn.button.Constructor = Button - - - // BUTTON NO CONFLICT - // ================== - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - // BUTTON DATA-API - // =============== - - $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - e.preventDefault() - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: carousel.js v3.0.2 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2013 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== */ - - -+function ($) { "use strict"; - - // CAROUSEL CLASS DEFINITION - // ========================= - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = - this.sliding = - this.interval = - this.$active = - this.$items = null - - this.options.pause == 'hover' && this.$element - .on('mouseenter', $.proxy(this.pause, this)) - .on('mouseleave', $.proxy(this.cycle, this)) - } - - Carousel.DEFAULTS = { - interval: 5000 - , pause: 'hover' - , wrap: true - } - - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) - - this.interval && clearInterval(this.interval) - - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - - return this - } - - Carousel.prototype.getActiveIndex = function () { - this.$active = this.$element.find('.item.active') - this.$items = this.$active.parent().children() - - return this.$items.index(this.$active) - } - - Carousel.prototype.to = function (pos) { - var that = this - var activeIndex = this.getActiveIndex() - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) return this.$element.one('slid', function () { that.to(pos) }) - if (activeIndex == pos) return this.pause().cycle() - - return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) - } - - Carousel.prototype.pause = function (e) { - e || (this.paused = true) - - if (this.$element.find('.next, .prev').length && $.support.transition.end) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - - this.interval = clearInterval(this.interval) - - return this - } - - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } - - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } - - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || $active[type]() - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var fallback = type == 'next' ? 'first' : 'last' - var that = this - - if (!$next.length) { - if (!this.options.wrap) return - $next = this.$element.find('.item')[fallback]() - } - - this.sliding = true - - isCycling && this.pause() - - var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) - - if ($next.hasClass('active')) return - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - this.$element.one('slid', function () { - var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) - $nextIndicator && $nextIndicator.addClass('active') - }) - } - - if ($.support.transition && this.$element.hasClass('slide')) { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .one($.support.transition.end, function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { that.$element.trigger('slid') }, 0) - }) - .emulateTransitionEnd(600) - } else { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger('slid') - } - - isCycling && this.cycle() - - return this - } - - - // CAROUSEL PLUGIN DEFINITION - // ========================== - - var old = $.fn.carousel - - $.fn.carousel = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide - - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - $.fn.carousel.Constructor = Carousel - - - // CAROUSEL NO CONFLICT - // ==================== - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - - // CAROUSEL DATA-API - // ================= - - $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - var $this = $(this), href - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - var options = $.extend({}, $target.data(), $this.data()) - var slideIndex = $this.attr('data-slide-to') - if (slideIndex) options.interval = false - - $target.carousel(options) - - if (slideIndex = $this.attr('data-slide-to')) { - $target.data('bs.carousel').to(slideIndex) - } - - e.preventDefault() - }) - - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - $carousel.carousel($carousel.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: collapse.js v3.0.2 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2013 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== */ - - -+function ($) { "use strict"; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.transitioning = null - - if (this.options.parent) this.$parent = $(this.options.parent) - if (this.options.toggle) this.toggle() - } - - Collapse.DEFAULTS = { - toggle: true - } - - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return - - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var actives = this.$parent && this.$parent.find('> .panel > .in') - - if (actives && actives.length) { - var hasData = actives.data('bs.collapse') - if (hasData && hasData.transitioning) return - actives.collapse('hide') - hasData || actives.data('bs.collapse', null) - } - - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - .addClass('collapsing') - [dimension](0) - - this.transitioning = 1 - - var complete = function () { - this.$element - .removeClass('collapsing') - .addClass('in') - [dimension]('auto') - this.transitioning = 0 - this.$element.trigger('shown.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - var scrollSize = $.camelCase(['scroll', dimension].join('-')) - - this.$element - .one($.support.transition.end, $.proxy(complete, this)) - .emulateTransitionEnd(350) - [dimension](this.$element[0][scrollSize]) - } - - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return - - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var dimension = this.dimension() - - this.$element - [dimension](this.$element[dimension]()) - [0].offsetHeight - - this.$element - .addClass('collapsing') - .removeClass('collapse') - .removeClass('in') - - this.transitioning = 1 - - var complete = function () { - this.transitioning = 0 - this.$element - .trigger('hidden.bs.collapse') - .removeClass('collapsing') - .addClass('collapse') - } - - if (!$.support.transition) return complete.call(this) - - this.$element - [dimension](0) - .one($.support.transition.end, $.proxy(complete, this)) - .emulateTransitionEnd(350) - } - - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - - // COLLAPSE PLUGIN DEFINITION - // ========================== - - var old = $.fn.collapse - - $.fn.collapse = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.collapse') - var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.collapse.Constructor = Collapse - - - // COLLAPSE NO CONFLICT - // ==================== - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - // COLLAPSE DATA-API - // ================= - - $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href - var target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - var $target = $(target) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() - var parent = $this.attr('data-parent') - var $parent = parent && $(parent) - - if (!data || !data.transitioning) { - if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') - $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - } - - $target.collapse(option) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: dropdown.js v3.0.2 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2013 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== */ - - -+function ($) { "use strict"; - - // DROPDOWN CLASS DEFINITION - // ========================= - - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle=dropdown]' - var Dropdown = function (element) { - var $el = $(element).on('click.bs.dropdown', this.toggle) - } - - Dropdown.prototype.toggle = function (e) { - var $this = $(this) - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we we use a backdrop because click events don't delegate - $('