Render tags in the packaged themes#585
Conversation
|
This is good, though the url But, now that you mention it, there's a difference between v0 and v2: In v2, content is not "owned" by an application. So, in v0, a blog post can ask the Blog app for the tag URLs it knows about and show them on itself. In v2, the blog post is not attached to the blog except via the links the blog creates. When the user gets to the post's URL, we no longer know what App they came from... Off the top of my head, some possibilities for solving this problem:
# Sample taxonomy configuration
taxonomy:
git:
filter: { tags: 'git' }
route: '/blog/tag/git'
mojolicious:
filter: { tags: 'mojolicious' }
route: '/mojo' # custom page for mojolicious stuff
tmux:
filter: { tags: 'tmux' }
route: 'app:blog/tag/tmux' # Call a method on the blog app to make the URL?It may be that a combination of 2 and 3 is needed to really make this work, but it all seems very complex... It is just an application of the same principles as the list app and categories, so maybe it's not as difficult to understand as I fear? And, global taxonomies could do fun things like override templates / layout / other settings for the page. For this early stage, this patch is good, and it'll remind someone that there's still some development needed here if it goes in (either by it throwing 404 errors or by someone reporting a bug 😄) |
Also: the blog / list apps do not have a base_url, only the whole application
Produce working URLs whether the blog app route ends with `/` or not, through joining on `/` and doing `=~s{//}{/}r`
Discussion in preaction#585
|
@preaction I see now that the patch doesn't work. I think it only worked for me because I've set the blog app route to "/" and I was thinking incorrectly that tags would always be under "/tag". See #586 for an attempted fix. If I understand the taxonomy you propose, it's kind of like that already with routes for apps being set in the "conf" object. #586 uses it, but I sense you had an idea behind removing "route" from the blog/list config. Also, |
Looks the same as in v2 but hidden behind an extra if - tags are not fully supported yet (can't add them through Yancy UI) and anyway, better write nothing than Tags: for a post without tags.