-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
I set up a very simple new site to play with with the following structure:
.
├── blog
│ ├── first_post.org
│ └── second_post.org
├── pages
│ └── index.org
├── publish.el
└── templates
├── blog.html
├── layout.html
├── page.html
└── post.html
My publish.el contains the following routes:
(weblorg-route
:name "pages"
:input-pattern "pages/*.org"
:template "page.html"
:output "output/{{ slug }}.html"
:url "/{{ slug }}.html")
(weblorg-route
:name "blog"
:input-pattern "blog/*.org"
:template "post.html"
:output "output/blog/{{ slug }}.html"
:url "/blog/{{ slug }}.html")
(weblorg-route
:name "blog-index"
:input-pattern "blog/*.org"
:input-aggregate #'weblorg-input-aggregate-all-desc
:template "blog.html"
:output "output/blog/index.html"
:url "/blog/")
In my main index.org, I have the following link:
[[url_for:blog-index,slug=index][Check out my blog]]
Publishing fails with the error:
Template Error: Variable `slug' not declared
Doing a little digging around, it looks like the problem is actually the hyphen in the name of the route blog-index! If, instead of blog-index, I rename the route to blog_index, and change the link to [[url_for:blog_index,slug=index]], publishing works perfectly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels