Generalize summary

Now it correctly applies to templates and other types of pages as well.