-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
[Proposal] Add a variable to describe site's content directory #10969
Comments
I suggest you do something ala:
Which isn't the same as what you do today as you would need to know that it's inside Note that if you're talking about links to the files on disk (and not GitHub), you can do:
|
We can certainly add "something" to simplify the above, but I don't see what. |
Thanks for your suggestions, I want to generate links about the view/edit URLs of GitHub/GitLab, but I didn't figure out a solution. |
@razonyang This forum topic might be helpful, specifically:
For this to work, Hugo must be run within the project directory (i.e., cannot use |
@jmooring Thanks, I thought about this, as you mentioned, |
This is what I really really want:
|
@jmooring Thanks a lot, will try later. |
|
Sure, we can do that, but note that
Will not work for files in themes/modules. |
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. |
Hi, I use the
Language.ContentDir
to get the relative path of pages to the site root, which is useful for generating the links to view/edit the pages. But the internal use variable was removed on this commit, is there a workaround to get the relative path of the pages? Or is it possible to expose a function or variable to achieve this?Thanks.
The text was updated successfully, but these errors were encountered: