Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

post_url tag issues #245

Closed
WalkerCodeRanger opened this issue May 6, 2015 · 1 comment
Closed

post_url tag issues #245

WalkerCodeRanger opened this issue May 6, 2015 · 1 comment

Comments

@WalkerCodeRanger
Copy link

Using pretzel 0.2.1.169 (build 175) which I downloaded from Appveyor (non script cs zip), the post_url tag doesn't respect the permalink setting and also I am pretty sure it is supposed to generate with a leading slash.

Steps to reproduce

  1. pretzel create
  2. edit _config.yaml to add permalink: /blog/:year/:month/:title/ at the end (note trailing slash to avoid issue Extensionless permalinks #244)
  3. edit _posts\2015-05-05-myfirstpost.md to add {% post_url 2015-05-05-myfirstpost %} before hello world
  4. pretzel taste
  5. Click the "My First Post" title to go to http://localhost:8080/blog/2015/05/myfirstpost/

You'll see "2015/05/05/myfirstpost.html" at the top of the post. This is generating a url using the standard permalink scheme instead of the configured one. Also I am pretty sure that there should be a leading slash. That is based on how I was always able to use post_url in my jekyll site for github. Also, the docs show an example of [Name of Link]({% post_url 2010-07-21-name-of-post %}) which would only make sense if the url had a leading slash. So, the link should be "/blog/2015/05/myfirstpost/"

@laedit
Copy link
Member

laedit commented May 19, 2015

Right now the PostUrlTag is totally isolated and don't have the necessary information about the pages to do his job correctly.
The problem is that currently DotLiquid create a new instance of the tag just before using it, so I am waiting for dotliquid/dotliquid#150 to fix this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants