[[!comment format=mdwn
 username="anarcat"
 avatar="http://cdn.libravatar.org/avatar/825d3c30cb96a053b5335e51b8d0bd49"
 subject="not sure about the name"
 date="2025-04-09T20:55:38Z"
 content="""
it looks like the `PERMALINK` variable is set elsewhere, see [[bugs/inline_breaks_PERMALINK_variable]] for example.

grepping around, it looks like it is set in the plugins aggregate, comments, inline, meta, recentchanges, and search, all in different contexts, but it seems precarious to set it globally, i'd say.

with [[todo/include_page_variable_in_base_templates]], we have PAGE already... don't we just need the url config to be passed down to the template here?

maybe something like [this patch](https://gitlab.com/anarcat/ikiwiki/-/commit/c2e63cbd195db95115fe4e1e1ef591bfdf290135):

```patch
publish the URL variable for the absolute URL of the site

Combined with PAGE, it provides us with a way to access the permalink
of a page within templates.

1 file changed, 1 insertion(+)
IkiWiki/Render.pm | 1 +

modified   IkiWiki/Render.pm
@@ -134,6 +134,7 @@ sub genpage ($$) {
 		mtime => displaytime($pagemtime{$page}),
 		ctime => displaytime($pagectime{$page}, undef, 1),
 		baseurl => baseurl($page),
+		url => $config{url},
 		html5 => $config{html5},
 		responsive_layout => $config{responsive_layout},
 	);
```

no?
"""]]
