COLUMBIA, S.C. — Dylann Roof spat on and burned the American flag, but waved the Confederate.

He posed for pictures wearing a No. 88 T-shirt, had 88 Facebook friends and wrote that number — white supremacist code for “Heil Hitler”— in the South Carolina sand.

A website discovered Saturday appears to offer the first serious look at Mr. Roof’s thinking, including how the case of Trayvon Martin, the black Florida teenager shot to death in 2012 by George Zimmerman, a neighborhood watch volunteer, triggered his racist rage. The site shows a stash of 60 photographs, many of them of Mr. Roof at Confederate heritage sites or slavery museums, and includes a nearly 2,500-word manifesto in which the author criticized blacks as being inferior while lamenting the cowardice of white flight.

“I have no choice,” it reads. “I am not in the position to, alone, go into the ghetto and fight. I chose Charleston because it is most historic city in my state, and at one time had the highest ratio of blacks to Whites in the country. We have no skinheads, no real KKK, no one doing anything but talking on the internet. Well someone has to have the bravery to take it to the real world, and I guess that has to be me.”