Граф коммитов

119 Коммитов

Автор SHA1 Сообщение Дата
Mark Tareshawty 0892d28ef3
Merge pull request #1173 from git/constants
Move constants out of lib and freeze them
2018-03-07 09:28:48 -05:00
Mark Tareshawty c80113f8f3
Remove REDIRECT and supporting code 2018-03-07 09:06:28 -05:00
Mark Tareshawty 8939e090c6
Remove loading of constants from lib 2018-03-06 20:24:56 -05:00
Mark Tareshawty 27430fb3c6
Move lib/constants.rb to be under initializers
Also freeze the immutable constants
2018-03-06 20:24:40 -05:00
Jeff King 1f3427f7fd add "about this site" page
This patch adds an "about this site" page and links to it
from the footer (where we previously just linked straight to
the git-scm.com repo).  This serves a few purposes:

  - we lay out the relationship between the various bits of
    site content. This clarifies the licensing, and
    hopefully directs bug reporters to the right place.

  - we credit Scott, who has moved on but without whom the
    site would absolutely not exist in its current form

  - it gives us a place to credit the companies that are
    sponsoring us with resources
2018-03-06 23:12:19 +01:00
pedrorijo91 ff635f6a16
Removes unnecessary eager loading.
Bullet was throwing a warning. Also removed some commented code.
2018-02-09 22:17:32 +00:00
Jeff King 7c59eaa186 routes: restore bare /year/month/date/slug blog route
We only switched to /blog in 2013, so there's a real chance
that old links would use the bare format. And it's not that
hard to match them and give them the same redirect.
2018-02-08 05:00:39 -05:00
Jeff King dd8b9d57e6 drop blog content
There hasn't been a blog post in 7 years, and there are no
plans to revive it. The existing posts generally fall into
one of two categories:

  - news about the pro git book

  - technical notes that weren't covered in the 1st edition
    of pro git

The former are no longer interesting at all. And the latter
had their content folded into the second edition.

So let's drop this content, as we sometimes get issues
raised about its accuracy and formatting. We want to
redirect people to the actually-maintained book content.

We'll put a short note in the /blog route to help anybody
who follows old links to these posts.
2018-02-08 04:25:27 -05:00
Jeff King 67d3d9b9f9 drop UPDATE_TOKEN code
Once upon a time, the idea was that you could update the
site with new book versions by posting to a special endpoint
with a secret token.

But these days we fetch the book material directly to the
rails environment by running a periodic rake task, and then
update the database directly. Let's drop this unused code.
2018-02-08 03:23:56 -05:00
Jeff King 0529ef9c94 drop "related items" code
We haven't been populating the database with this for some
time (and any residual records have been gone for almost a
year due to the database transition). And nobody seems to
have noticed.

Let's just give up on the feature in the name of simplicity.
2018-02-08 03:13:31 -05:00
Jeff King 13e0e7bf85 routes: clean up documentation/ routes
These are historical names for things in /doc, etc. Let's
make them actual redirects so that people see the "official"
URLs (and we may eventually deprecate and remove these).
2018-02-07 09:26:16 -05:00
Jeff King 395a6f2acf redirect /book/commands to /docs
This currently generates a poorly formatted list of commands
with no actual links to the manpage. It was originally
referenced as part of a command index in a mock-up that went
away in the previous commit.

Probably nobody links to it, but we can easily just redirect
it to our good-looking link-filled command reference page.

Note that this lets us drop the redundant list of commands
in lib/constants.rb.
2018-02-07 09:18:15 -05:00
Jeff King c635f6b477 drop doc#book endpoint
This is from an old mock-up of the book code. It doesn't
actually work (it returns a 500 probably because the
database schema has changed). The real endpoint is "/books",
so let's redirect there.
2018-02-07 09:12:58 -05:00
Jeff King 0740d7bf3e drop config/initializers/categories.rb
Once upon a time this was supposed to generate the `/docs`
index page, but it hasn't been used since b4fc467 (pulled in
jasons changes, moving to using his haml directly,
2012-03-29).

Let's drop it, since it creates hassle when updating the
command list.
2018-02-07 08:38:06 -05:00
Ævar Arnfjörð Bjarmason e918a3af9b overview page: add link to git-worktree
It has been noted on
https://public-inbox.org/git/CACsJy8Dt_TjfRk05oNW8DXrdn6s_QV8NQZKnnrgGkj3WTN_=3A@mail.gmail.com/T/#t
that even though this is an official porcelain command there's no link
to it from /docs, fix that.

I have not run this version of the site (don't have the env to do
that), but replicated how we're listing mergetool, so this should
work.
2018-02-07 11:30:28 +00:00
Jason Long 8442ef7dfe
Remove RSS feed 2018-01-15 16:14:56 -05:00
chotuaashiq dfed044797 Changes to the stylesheets done 2017-12-29 06:31:01 +05:30
chotuaashiq 7acba45b9d Changes to the stylesheets done 2017-12-29 06:30:06 +05:30
chotuaashiq 59be4cb4c2 Corrected the routes.rb file 2017-12-20 10:48:25 +05:30
chotuaashiq 64a1becd78 Trademark both links working now, Duplicacy removed 2017-12-20 01:00:11 +05:30
chotuaashiq 57d08ab9cd Trademark in About section added 2017-12-15 20:33:03 +05:30
chotuaashiq 29a5cd2571 About expansion added 2017-12-15 20:33:03 +05:30
Jeff King d2778a3183 Revert "Merge pull request #1047 from git/raygun"
I added Raygun support to get a handle on the exceptions we
were seeing due to timeouts in #1045. That's now reverted,
so the primary reason is gone.

Furthermore, the Intro plan only allows 500 exceptions per
month, and we exceeded that pretty quickly. Most of these
are just noise, so we may want to consider a service like
this after cleaning them up. But in the meantime, it's not
accomplishing anything.

The noisy exceptions seem to mostly be related to book
languages with broken links or incomplete translations. They
fall mainly into two buckets:

  - dereferencing nil for various items. E.g., hitting
    https://git-scm.com/book/sr/v1/%D0%9F%D0%BE%D1%87%D0%B5%D1%82%D0%B0%D0%BA-Getting-Help
    returns the 500 error page.

  - ActionController::BadRequest. E.g., hitting https://git-scm.com/book/ko/Git-%EC%EF%BF%BD%EF%BF%BD%EB%B2%EF%BF%BD-GitWeb
    returns no output
2017-10-16 11:59:39 -04:00
Jeff King 5dfb6d881e add raygun gemfile
We don't currently have any kind of logging or alerting on
unhandled exceptions. I'm experimenting with Raygun's free
"intro" plan so that I can at least get basic data like
"what exceptions did we see today?".
2017-10-11 13:52:37 -04:00
Jeff King ce63db9a45 drop /admin route
This just shows a list of the downloads pulled down from the
`download` task. Potentially useful for remote-admin, I
guess, but it falls far short of what's needed for actual
debugging (and I can't think of a single time when it would
have been helpful).

It also seems to cause rendering exceptions on the
production site when spam requests look at it.

Let's just drop it as ancient and not-useful.
2017-10-11 13:27:03 -04:00
Jeff King 775101e178 doc: drop "test" route
This looks like debugging cruft added in 97bc298 (implement
ref version dropdown, 2012-04-17), and hasn't been kept up
to date (it tries to show the rebase page but doesn't
actually work).

This isn't a huge deal, but requesting `/test.zip` (which
some spam scripts do) results in an exception.
2017-10-11 13:20:51 -04:00
Jeff King 536c572e49 point elasticsearch at $BONSAI_URL
I'm not sure why the $SEARCH_INDEX_URL variable is used. It
does provide a layer of indirection, and the existing site
has both Bonsai and Searchify set up. So maybe it was for
switching between them.

These days we're just using Bonsai, so let's point it at the
variable that is automatically set up by the Heroku add-on.
2017-05-03 02:15:48 -04:00
Jeff King 4529f47444 switch rails caching from memcachier to heroku-redis
We don't really care between the two, and this should keep
all of our billing at Heroku (which can then be part of a
single sponsorship).
2017-05-03 01:03:32 -04:00
Jeff King e89e6fafe0 rails: s/assets/files/ in config.serve_static_assets
The former has been deprecated, and Rails produces an
annoying warning.
2017-05-03 01:02:12 -04:00
Jeff King 3144750faf add 'bullet' gem in development mode
This helps find n+1 queries, which seem to be one of the
main causes of production slowness.
2017-03-10 05:05:41 -05:00
Jeff King 232147e6c1 drop New Relic support
As pointed out in [1], the New Relic support causes the
output from the site to be non-deterministic.  That makes
caching at the CDN-level harder.

Since I don't actually have access to the analytics results,
let's just drop it entirely. It's just one less complication.

[1] https://github.com/git/git-scm.com/pull/941#issuecomment-277261450
2017-02-08 17:02:20 -05:00
Jeff King 1ed2af1811 Merge pull request #940 from Haroenv/patch-1
add git-check-ignore to list of plumbing commands
2017-02-08 13:07:27 -05:00
Haroen Viaene b9af41b1ba add check-ignore to categories.rb 2017-02-04 09:55:50 +01:00
Adam Stankiewicz 2e8fa7e2a0
Improve caching for pages and assets 2017-02-03 00:44:17 +01:00
Jeff King 0315fd28be books: fix historical redirects
When we see "/book/4_git_treeishes", we route it via a
redirect table to "/book/en/Git-Tools-Revision-Selection".
However that URL is generated by feeding "en/..." to the
book_lang_path() helper from the routes table, which quotes
the "/", breaking the link.

We can work around this by splitting the two parts and
feeding them to the "book/:lang/:slug" route instead.
2017-01-21 08:36:23 -05:00
Andrey Rybak eedf061d1a Add new category "Guides" to the reference topics
Consists of the guides presented by "git help --guides" command.
2016-09-11 19:29:13 +03:00
Dirkjan Bussink ff1a02f6f6 Enforce https for entire site
Now that it's properly available behind https, let's enforce it so that
links get redirect over http and that we can set things like HSTS.

Also updates older links that should be links to *.github.io or link to
github.com over https.
2016-03-14 15:27:16 +01:00
Scott Chacon 41cd34c2ad Merge pull request #569 from git/fix-builds
Fix Builds
2015-08-11 09:41:54 -07:00
Scott Chacon 9ba1289619 serve static files from rails 2015-08-11 09:27:27 -07:00
Jason Long ae93911ac7 Turn on sass compression 2015-03-24 13:53:20 -04:00
Patrick Eigensatz a5f5ab64dc Added git-bundle to the doc categories 2015-01-07 13:24:54 +01:00
Scott Chacon 21632d44eb update API 2014-10-26 20:38:39 +01:00
Scott Chacon 0f26f69f7c xrefs all seem to work 2014-10-25 00:48:11 +02:00
Scott Chacon f807bda862 fix related task 2014-10-25 00:48:10 +02:00
Scott Chacon 05cde2511a prepare for progit v2 2014-10-23 16:50:26 +01:00
bry4n 5daa767493 Redirect to howto file 2014-08-25 19:25:07 -05:00
bry4n 8c400d0285 Increase rack timeout 2014-07-30 19:49:23 -05:00
bry4n f3c780a820 Update example 2014-07-28 19:10:51 -05:00
bry4n 5f3af6ffbb Rename database.yml 2014-07-28 19:08:41 -05:00
bry4n 1060b5cb15 Update environments 2014-07-24 22:20:28 -05:00