On the Wiki, in the section on putting the cables together of the Y Endstops, the picture showes the order of wires as BLUE - GREEN - BROWN, and the titles state that Blue is pin number one, green is two, and brown is three.

On my connector, the numbers are on the back. In orientation to the picture, the numbers are mirrored (3 - 2 - 1).

Do I follow the guide, or the picture (which I assume is of a working cable)?

It turns out, it doesn't actually matter, since the pin header the connector plugs in to is non-polarized (you can plug it in upside-down). The important thing to remember is that whichever way you do it, the green wire should be in the middle, and when you plug it in to the endstop board, make sure that the blue wire connects to the pin that is labeled "VCC" on the board. The pinout is:

blue - VCC
green - signal
brown - ground

Double-check that you've plugged it in so that it matches up with the text on the board.