Skip to content

Conversation

jvns
Copy link
Collaborator

@jvns jvns commented Oct 1, 2025

This renames "Downloads" to "Install" and redesigns the page to simplify it a lot. You can see it in action here: https://jvns.github.io/git-scm.com/install/win

I'm still not sure where the Logos page should be linked. Maybe in About?

I've designed it as "tabs", where each tab is a separate page. I did it that way for accessibility (though I'm very far from an accessibility expert): the idea is that it would be easier for someone using a screenreader if they don't have to navigate through a bunch of irrelevant content. The install-header shortcode is rendered in an awkward way (you have to close some

tags that are secretly updated in the tab header), but I didn't think of a better way to do it yet.

The Install links on the sidebar and homepage get automatically updated with Javascript to point to the appropriate page.

The Build from Source page is pretty sparse right now, maybe it would be good in the future to point users to instructions for how to build Git from source.

Todos:

  • Figure out Logos section
  • Fix tabs in mobile version somehow (right now they don't all fit)
  • Double check that all aliases are updated correctly
  • Maybe rename /install/win to /install/windows?

jvns added 5 commits October 1, 2025 14:44
- Add a new style where we display the install instructions as tabs,
  with a shortcode and CSS
- Update aliases
- Move existing Windows/Linux/Mac pages to the new style, keeping the
  content the same

Signed-off-by: Julia Evans <[email protected]>
Add a script that will update the homepage / sidebar links to the
appropriate OS-specific link.

This falls back gracefully: if the script doesn't run, you can just
go to /install/ and click on the appropriate page.

Signed-off-by: Julia Evans <[email protected]>
We already have a "Build from source" page
<a href="{{ relURL "downloads/logos" }}"{{ if (eq .Params.Subsection "logos") }} class="active"{{ end }}>Logos</a>
</li>
</ul>
<a href="{{ relURL "install" }}"{{ if (eq $section "install") }} class="active"{{ end }}>Install</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the reason why the Playwright tests fail now...

Error: expect.not.toHaveClass: Error: strict mode violation: getByRole('link', { name: 'All' }) resolved to 2 elements:
    1) <a class="install-link" href="http://localhost:5000/install/win">Install</a> aka getByRole('link', { name: 'Install' })
    2) <a href="#" data-os="" class="subtle-button gui-os-filter">All</a> aka getByRole('link', { name: 'All', exact: true })

Call log:
  - Expect "not toHaveClass" with timeout 5000ms
  - waiting for getByRole('link', { name: 'All' })


  66 |
  67 |     const allButton = page.getByRole('link', { name: 'All' })
> 68 |     await expect(allButton).not.toHaveClass(/selected/)
     |                                 ^
  69 |
  70 |     const thumbnails = page.locator('.gui-thumbnails li:visible')
  71 |     const count = await thumbnails.count()
    at /home/runner/work/git-scm.com/git-scm.com/tests/git-scm.spec.js:68:33

We probably need to change this line:

    const allButton = page.getByRole('link', { name: 'All' })

to use an exact match:

    const allButton = page.getByRole('link', { name: 'All', exact: true })

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for looking into that, will try that fix!

Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants