After you have completely dug out the path area and compacted the existing earth, you need to shore up the edges of the path and install the weed fabric. Paths are the appropriate place to use weed fabric. Put the weed fabric down before installing any edging. Edging stakes can help to hold the fabric in place and it gives a clean barrier for the material inside the path. In this location, the weed barrier fabric helps keep the path materials from sinking in and blending with the soil as time passes.
Your weed barrier fabric should be at least 1 foot wider than the path. Place it along the bed of the pathway with equal overlap on either side. As you install the edging (aluminum, steel or flexible recycled lumber), you'll lay it on top of the weed barrier fabric. Then pull the leftover material against the outside edge of the edging. Backfill the space behind the edging and fabric with soil then cut the fabric level or just below the top of the edging (see step 3 below.)
As you're installing the edging, keep it flush with the grade of the landscape. There may be areas where the edging needs to be brought up or where it needs to go deeper so that it meets up with the grade of the landscape in a way that looks nice and won’t cause a tripping hazard. You also have to pay attention to the width while you are installing the edging. Constantly check the width-- but don’t be too hard on yourself if it isn’t perfectly straight. Paths move when they are being dug out regardless of how careful you are.
Tip: Cut a couple of 2x6's to the desired width of your path then use them as spacers when installing the edging to keep the width and depth of the path consistent. It will save a lot of aggravation and measuring!