For the repository I use the actual repository not Ancestry, Family Search, etc.
The reason is that the online web site change URL's and may not be here tomorrow, so what is to day may not be tomorrow.
If I list the LOC or NARA as the repository I will list one or multiple access points. ie Ancestry, Family Search
I print AKK of my document image to PDF's, so later as I am preparing my sources, I don't always remember exactly which site I found the census records.
I handle state and local data in the same manner. If I have a death record, I can request it form the proper government office. This used to be difficult but is easy with Google.
There are some document images where I reference the online site. An example is the undocumented records from Family Search. From experience, I know that while they came from a local government, the local government may have no idea of where the record is located.
There are some records ie Pennsylvania Church records where Ancestry is truly the repository, and I list as such.