Keeping your liver healthy is not really different from keeping yourself healthy altogether. managing weight, engaging in exercise, including enough vegetable and fruit, all these are important. Vegetables are particularly important for liver function.
There are also cleansing agents such as grapefruit and green tea. You probably know that excess alcohol damages the liver, so this is something you can avoid. A lifestyle with heavy and prolonged alcohol abuse will lead to cirrhosis of the liver. Remember, you only have one liver and you can't live without it!