Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An extra post/ in the FullFilePath #732

Closed
ghost opened this issue Dec 20, 2014 · 2 comments
Closed

An extra post/ in the FullFilePath #732

ghost opened this issue Dec 20, 2014 · 2 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Dec 20, 2014

{{ .Page.FullFilePath }} inside a shortcode produces post/post/first.md for the file post/first.md.

How to reproduce:

  1. Create a site, add a theme.
  2. hugo new post/first.md
  3. mkdir -p layouts/shortcodes
  4. Add a file layouts/shortcodes/path.html with the following content: {{ .Page.FullFilePath }}
  5. Add the following content to the post/first.md: {{% path %}}
  6. hugo -D -t hyde
  7. grep post/ public/post/first/index.html

This will output <p>post/post/first.md.

@bep bep added the Bug label Dec 20, 2014
@bep bep self-assigned this Dec 28, 2014
@bep bep removed their assignment Jan 5, 2015
@bep
Copy link
Member

bep commented Jan 5, 2015

@spf13 - you know this code ... there is a confusion between Dir() ("post/") and Path() ("post/first/index.html") ... I guess Dir() should return "/home/myhugoproject/content/".

@bep bep added this to the v0.13 milestone Jan 19, 2015
@spf13 spf13 modified the milestones: v0.13, v0.14 Feb 22, 2015
@bep bep assigned bep and unassigned spf13 May 31, 2015
@bep bep modified the milestones: v0.15, v0.14 May 31, 2015
@bep bep closed this as completed in be0903c May 31, 2015
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
bep added a commit that referenced this issue Jul 12, 2020
bep added a commit that referenced this issue Jul 12, 2020
bep added a commit that referenced this issue Jul 12, 2020
bep added a commit that referenced this issue Jul 13, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants