I've humoured the idea but never ended up building anything. Most people try to use a car alternator, but those are actually very hard to get any meaningful power out of as they are designed to operate at high RPM.
Best bet is to spin a large disc (could make it the back wheel) and you put magnets along the far edges then you have an equal amount of coils that the magnets go over. Then you tie all the coils together, rectify it into DC then pass it through a charge controller to charge a small battery then hook the inverter to it. You can skip the inverter but then you have to mess with different DC voltages for whatever other things you want to charge. Laptops usually take some oddball voltage like 19 volts.
Solar is probably easier and will end up giving you more power though. A human can generate around 400 watts on a bike with bursts of 1000w, so if you are a super elite athlete and can keep burst for 1 full hour, that's 1kwh of energy produced, which is probably near impossible to do. In reality you're lucky to generate 100wh in 1 hour. You'd probably take breaks in between then get back at it. Still could be fun to have a setup like that though to add extra power to the battery bank, and get a workout at same time. I wonder if an elliptical would be more efficient as you work your arms too, just need to convert all that motion into a spinning motion.
So assuming you need your laptop because you're working from home, pedaling on a bike is probably not going to be an easy option while you're trying to do your job.
The last time my power went out while I was working from home I just ran an extension cord to my shed as I have 400w of solar on it. I have a plug inside my house now so I just need to run an extension cord to the basement if it happens again. Eventually want to run plugs everywhere too, just have not gotten around to it.
I eventually want to experiment with wind power, as solar power does not work as well in winter because of the snow. I try to get most of it off but when we get freezing rain it just creates a nasty crust so I can't get it off. Wind power in a residential environment is not that great though. Probably save that for the homestead. Then again on the homestead I'd have way more room so I would just have more panels, and put them vertical.