You might be able to compost garden weeds – it depends on the weed.
As the old saying that I just made up goes, ‘one man’s weed is another man’s salad’ so it really depends on what you mean when you say ‘weed’.
It’s really, really important not to compost some pernicious or invasive weeds (see below) but aside from them, you should be ok composting most common weeds – just detach the roots (especially big tap roots) to reduce the chance that they’ll start growing again in the compost heap, and remove seed heads in case the seeds aren’t destroyed during the composting process.
If you are adding lots of weeds, keep the heap well turned and well balanced to ensure it works as efficiently as possible, destroying the weeds before they can spring back to life.
Don’t compost