For a meta tag like:
<meta name="description" content="Sample Content">
I want to write a similar named block in mako template. I know the basic template format:
<%block name="meta"></%block>
I want to understand how to add the content attribute and its value in this named block.
I don't think named blocks can really take arguments unless it is a page argument which doesn't seem to match this use-case very well. They are in the documentation.
You could use a function like this but the verbosity almost defeats the purpose:
In my layout, base, template I usually group the typical meta tags together in a single function and pass in the common arguments there.
Then in an inheriting template I might extend head meta to explicitly set title: