That is doctoring on the symptom, not the cause.
Go outside. You do not only need Vitamin D, you also need fresh air, green and exercise. You can not get this with pills.
In the long run you save time, because of longer life (and hacking) and reduced illness (better hacking).
I thought it was funny that this blog post didn't mention getting outside as a potential solution. That said, it's not like it's a dichotomy: I take a daily vitamin D supplement, try to eat as much catfish and salmon as I can, and try to get out in the sun as much as possible.
That said, getting out in the sun is a fairly nuanced debate. Most dermatologists will tell you not to, because of the risk of skin cancer, and because of the lack of peer-reviewed research showing that the benefits of skin-based vitamin D production outweigh the potential for skin cancer:
Wearing sunscreen will inhibit vitamin D production, so getting some sun while wearing high-SPF sunscreen is not going to help you as much as unprotected exposure (per the dermatologist in the aforementioned article)
So the question becomes: do you believe the "vitamin D hypothesis" that vitamin D deficiency was the driving force behind the evolution of human skin color? The hypothesis is that northern Europeans evolved lower melanin levels in their skin through a combination of high latitudes and a diet deficient in natural sources of vitamin D:
So the question of whether you should go out in the sun (unprotected) in order to generate vitamin D becomes a question of whether you are more worried about the potential health complications of vitamin D deficiency or skin cancer.
Just an observation: there are certain time intervals in a day that you CAN get some sun exposure without worring (too much) about UV rays & skin cancer. I do not know about the rest of the world, but in tropical regions the intervals are 6-9 am and 4-6 pm. 15 minutes per day is enough in tropical regions and a bit more in other regions.
Nevertheless, you have more than a couple of hours to get outside and get some sun. Just have a schedule and stick to it :)
One last thing: visit your doctor often and check for overall nutrient levels (vitamins, minerals, etc) and avoid taking supplements before it.
I think most of us work at least partly during the day, and if you're at home. Sit near a window, works like sunscreen to keep keep your skin safe but still allows UV light below 350 nanometers which is all that's needed to produce vitamin D.
You don't get skin cancer like you get a tan, unless you're a vampire, or older.
Just go outside early in the morning or late afternoon, when UV levels are lower. Don't stay toasting on 12:00 PM sun like people going to the beach do. We're talking about 10-30 minutes of sun exposition here.