If you look at the kanji of ように, it is 様に, where 様 means "like," "in the manner of."
This "like," or "in the manner" is the key to understanding the apparently different meanings of ように after a noun + の or a verb in the "infinitive form."
この+ように=this + like (or in the manner) ==> "like this" or "in this manner"
どの+ように=which + like (or in the manner) ==> "how," or "in which manner"
いつもの+ように=always + like (or in the manner) ==> "like always," "in the usual manner", "as always"
Now, after a verb, the meaning is similar:
行く+ように+した=To go + in the manner + did, which means, "I did in the manner as to go" but this is not how English speakers would say it. We say "I decided to go."
毎日+日本語を+勉強する+ように+心がけている=Every day + Japanese (object marker) + study + in the manner + try, or "I try in the manner such as to study Japanese every day." Again, this is not colloquial English, as we would say "I try to study Japanese every day."
太らない+ように+食べる=Not get fat + in the manner + eat ==> "Eat in such a manner so as not to get fat," or "eat in such a way in order not to get fat."