After World War I , Montenegro was absorbed by the Kingdom of Serbs , Croats , and Slovenes , which became the Kingdom of Yugoslavia in 1929 ; at the conclusion of World War II , it became a constituent republic of the Socialist Federal Republic of Yugoslavia .