Skip to content
Snippets Groups Projects
Commit e47ae9ea authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Major change to [[link]] widget.

parent 0eafc5ca
Branches
Tags
No related merge requests found
(define-module (ssg widgets link) (define-module (ssg widgets link)
:use-module (ice-9 regex) :use-module (ice-9 regex)
:use-module (srfi srfi-88)
:use-module (ssg config) :use-module (ssg config)
:use-module ((ssg lib) :select (url-append)) :use-module ((ssg lib) :select (url-append))
:export (link-to full-link-to doc widget)) :export (link-to full-link-to doc widget))
...@@ -31,5 +32,10 @@ Which might produce ...@@ -31,5 +32,10 @@ Which might produce
(assoc-ref (config) 'host) (assoc-ref (config) 'host)
(link-to item)))) (link-to item))))
(define* (widget to) (define* (widget key: to text)
(delay (link-to to))) "link
Emits the absolute URL of another page within the site."
(delay
`(a (@ (href ,(link-to to)))
,text)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment