Giter Site home page Giter Site logo

rimrul / git-scm.com Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dscho/git-scm.com

0.0 0.0 0.0 139.31 MB

Development version of the https://git-scm.com site

Home Page: https://dscho.github.io/git-scm.com/

License: MIT License

JavaScript 0.01% Ruby 0.02% HTML 99.93% SCSS 0.04%

git-scm.com's Introduction

Git Homepage CI Help Contribute to Open Source

This is the repository for the git-scm.com site. It is meant to be the first place a person new to Git will land and download or learn about the Git SCM system.

This site is built with Hugo and served via GitHub Pages.

Local development setup

You'll need the extended version of Hugo. On Windows, we recommend using the Windows Subsystem for Linux (WSL). You can serve the site locally via

$ hugo serve -w

The site should be running on http://127.0.0.1:1313. Note that it may be advisable to do this in a sparse checkout that excludes large parts of content/, to speed up the rendering time.

To test the site locally with the search enabled, run this instead:

$ hugo
$ npx -y pagefind --site public --serve

That site should be running on http://127.0.0.1:1414

Note that this will take about 7 times as long, and the site will not be re-rendered and live-reloaded in the browser (unlike with hugo serve -w).

Update manual pages

First, install the Ruby prerequisites:

$ bundler install

Then, you can build the manual pages using a local Git source clone like this:

$ ruby ./script/update-docs.rb /path/to/git/.git en

This will populate the manual pages for all Git versions. You can also populate them only for a specific Git version (faster):

$ version=v2.23.0
$ REBUILD_DOC=$version ruby ./script/update-docs.rb /path/to/git/.git en

Or you can populate the man pages from GitHub (much slower) like this:

$ export GITHUB_API_TOKEN=github_personal_auth_token
$ REBUILD_DOC=$version ruby ./script/update-docs.rb remote en  # specific version

Similarly, you can also populate the localized man pages. From a local clone of https://github.com/jnavila/git-html-l10n :

$ ruby ./script/update-docs.rb /path/to/git-html-l10n/.git l10n  # all versions
$ REBUILD_DOC=$version ruby ./script/update-docs.rb /path/to/git-html-l10n/.git l10n  # specific version

Or you can do it from GitHub (much slower) like this:

$ export GITHUB_API_TOKEN=github_personal_auth_token
$ REBUILD_DOC=$version ruby ./script/update-docs.rb remote l10n  # specific version

Update the Downloads pages

Now you need to get the latest downloads for the downloads pages:

$ ruby ./script/update-download-data.rb

Update the ProGit book

First, you will have to get the necessary prerequisites:

$ bundler install

Now you'll probably want some book data.

You'll have to get the book content from a repository on your computer by specifying the path:

$ git clone https://github.com/progit/progit2-fr ../progit2-fr
$ ruby ./script/update-book2.rb fr ../progit2-fr

That will generate the book content from the Asciidoc files and write the files to the local tree, ready to be committed and served via Hugo.

Alternatively, you need to have access to the Pro Git project on GitHub through the API.

$ export GITHUB_API_TOKEN=github_personal_auth_token
$ ruby ./script/update-book2.rb en

If you have 2FA enabled, you'll need to create a Personal Access Token.

If you want to build the book for all available languages, just skip the language code:

$ ruby ./script/update-book2.rb

Contributing

If you wish to contribute to this website, please fork it on GitHub, push your change to a named branch, then send a pull request. If it is a big feature, you might want to start an issue first to make sure it's something that will be accepted. If it involves code, please also write tests for it.

Adding new GUI

The list of GUI clients has been constructed by the community for a long time. If you want to add another tool you'll need to follow a few steps:

  1. Add a new .md file with the GUI client details: https://github.com/git/git-scm.com/tree/main/content/data/guis

    1. The fields need to be enclosed within --- lines
    2. The fields name, project_url, price, license should be very straightforward to fill.
    3. The field image_tag corresponds to the path of the image of the tool (should start with images/guis/).
    4. platforms is a list of at least 1 platform in which the tool is supported. The possibilities are: Windows, Mac, Linux, Android, and iOS
    5. order can be filled with the biggest number already existing, plus 1 (Adding to the bottom - this will be covered in the following steps). This is the only field whose value should not be enclosed in double-quote characters.
    6. trend_name is an optional field that can be used for helping sorting the clients (also covered in the next steps)
  2. Add the image to static/images/guis/<GUI_CLIENT_NAME>@2x.png and static/images/guis/<GUI_CLIENT_NAME>.png making sure the aspect ratio matches a 588:332 image.

Useful links regarding working with Hugo and Pagefind

License

The source code for the site is licensed under the MIT license, which you can find in the MIT-LICENSE.txt file.

All graphical assets are licensed under the Creative Commons Attribution 3.0 Unported License.

git-scm.com's People

Contributors

adsingh14 avatar akshatm147 avatar ben avatar blackant avatar bry4n avatar carlosmn avatar dependabot-preview[bot] avatar dependabot[bot] avatar dscho avatar hickford avatar hirse avatar jnavila avatar koraktor avatar ltomov avatar mmozuras avatar murmele avatar neatnit avatar nickh avatar packtpartner avatar pedrorijo91 avatar peff avatar pepoirot avatar phil-blain avatar schacon avatar sergioluis avatar spraints avatar tarebyte avatar ttaylorr avatar ugultopu avatar vdye avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.