12. A computer program product comprising a non-transitory computer-readable storage medium containing computer program code for performing client-side page layout of web content using templates, the code for: receiving a source comprising a plurality of assets of different asset types; identifying a plurality of candidate templates from a template database, where each identified candidate template comprises a plurality of slots, and where each slot is configured to receive an asset of a particular asset type; for each particular slot of each of the plurality of identified candidate templates, calculating a slot subscore by: identifying an aspect ratio of an image asset included in the source, scaling the image asset to fill the particular slot when the particular slot is an image asset type slot, determining an area of the image asset to be cropped based on an area of the scaled image that extends beyond one or more boundaries of the particular slot, determining whether the determined area of the image asset to be cropped included a specified area of the image asset that should not be cropped, and calculating the slot subscore for the particular slot based at least in part on an amount of cropping to be performed inside the specified area and the determination of whether the determined area of the image asset to be cropped included the specified area; determining a score for each of the plurality of identified candidate templates, wherein the score for an identified candidate template is determined by: aggregating the calculated slot subscores for the plurality of slots included in the identified candidate template, and, comparing a number and types of slots included in the identified candidate template with a number and types of assets included in the source; selecting a particular template from the scored plurality of identified candidate templates based on the scoring; and generating a readable article on a client device, the readable article comprising the assets of the source placed in the readable article according to the selected particular template.
14. The computer program product of claim 12 , wherein the identified candidate templates are templates approved by the publisher.