Grease and line an 8-inch square cake pan with greased parchment paper, so it comes up over the sides to act as handles.
In a small bowl, mix together the sugar and lemon zest (if using). Rub the zest into the sugar, so it really coats the sugar crystals.
In a stand mixer fitted with the paddle attachment, cream the butter, sugar mixture, and yolk together on medium-high speed until light and fluffy, about 3 minutes. Add the flour, salt, lavender (if using), and vanilla, and mix on low speed until the dough just starts to come together. Add the lemon juice and continue mixing on low speed until the dough comes together. It will seem crumbly but should hold together when pressed. If your dough isn't coming together, add a little more lemon juice, a teaspoon at a time.
Dump the dough into the prepared pan. Pat the dough into the pan and smooth it under a sheet of plastic. Or press into a log and wrap in plastic.
Refrigerate for at least 30 minutes, but this dough can also be done a day ahead.
Preheat the oven to 300°F / 150°C.
Using a paring knife, cut the chilled dough into any shape or size you want. If a log, cut ¼" thick.
Use a fork to dock the tops. This is purely decorative. Make a classic pattern, or get more creative if you like.
Bake in the middle of the oven for 20 to 30 minutes, until just golden. If cooking slices, bake for 15 minutes. They shouldn't take on much color and will look dry. You only want to bake them until they are just starting to turn golden on the bottom. They are traditionally very pale.
The shortbread needs to be totally cooled before they can be removed from the pan. Once they are cooled, remove from the pan and break along the scored lines.
