SEO/alternates

// app/controllers/post_controller/postcontroller.go
package postcontroller

import "golazy.dev/lazyseo"

func (c *PostsController) Show(post *Post) error {
	c.SEO(lazyseo.AlternateLink(lazyseo.Alternate{
		Type:  "application/rss+xml",
		Title: "Posts feed",
		URL:   "https://example.com/posts/feed.xml",
	}))
	c.SEO(lazyseo.AlternateLink(lazyseo.Alternate{
		Media: "only screen and (max-width: 640px)",
		URL:   "https://m.example.com/posts/" + post.Slug,
	}))
	c.Set("post", post)
	return nil
}