There are a number of sources. If you are comfortable using differential forms, then one source that you may find useful is
L. Hsu, Calculus of variations via the Griffiths formalism, J. Differential Geom. 36, 551–589 (1992).
He explains how to do this calculation very explicitly there.