How to wire a light , switch and receptacle
In the diagram you link to there is no neutral in the switch box so you cannot start there to wire a receptacle. You would need 3-wire romex + gnd (black, white, red, gnd) to a carry a neutral from the line cable in the fixture box to the switch box. You would use B for the always hot, R for the switched hot, W for the neutral.

EDIT
There are several ways to power this receptacle using standard ordinary wiring but you cannot start from the switch if is wired as in the diagram because there is no neutral there.

One way would be to run another cable (2-wire + gnd) from the ceiling box to the receptacle. This would go in the attic to the top plate above the receptacle where you would drill a hole and run the cable down to the receptacle box. The box currently there would have been removed, the wire pulled through the opening and into an "old work" box and the box inserted into the hole. Then install the receptacle. The cable you have right now from the switch to the receptacle would be cut at both ends and abandoned in the wall or pull it out if you can.

Another way would be to run a new cable (3-wire + gnd) from the fixture box to the switch. This would allow you to have a neutral in the switch box which your existing cable to the receptacle would connect to. This may be easier than the first choice.