On the analogwrite syntax page, the text says not to bother setting a pinmode when using (because it's a timer function). The following example, bigger than life, then sets a pinmode in that very context. I don't know how to edit your fancy docs so I'm putting the suggestion here to change that example.
Edit : upon reflection, I'm not sure whether the text or example is correct, but they ought to agree with each other, in order to be instructional.