If you are just going to put the batteries on one side, it's best to position the motor on the other side, like in your
first link. The
second link is one you'd use for a dual battery setup.
If your batteries are quite short, you can also put the motor on the other side of the servo and one battery pack on each side still.