For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
Joseph and Mary were betrothed or married at the time of Christ's conception, and since divorce was not a viable option at the time Joseph became Jesus's earthly father due to his being the husband of Mary.