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

Add %wiki_path% template variable. #573

Merged
merged 3 commits into from Mar 18, 2019
Merged

Add %wiki_path% template variable. #573

merged 3 commits into from Mar 18, 2019

Conversation

HugoNikanor
Copy link
Contributor

I needed a %wiki_path% variable for a git integration script I'm writing. I also thought that up-streaming it would be a good idea.

Recreated issue to point at different branch in my fork.

@EinfachToll
Copy link
Member

Ok, this may be useful for some users. If you would add a remark about it to the "Placeholders" section of the doc, this would be even greater.

@HugoNikanor
Copy link
Contributor Author

I added a short piece of documentation. See the second commit.

@HugoNikanor
Copy link
Contributor Author

Ping. Will this be merged?

@hq6 hq6 self-assigned this Mar 15, 2019
@hq6
Copy link
Contributor

hq6 commented Mar 15, 2019

@HugoNikanor , I am a new maintainer and I'm interested in getting this merged.

It seems that all the other placeholder variables start with a % but do not end with a %. Is there a good reason for %wiki_path% to break this convention?

@HugoNikanor
Copy link
Contributor Author

@hq6 As far as I can see the placeholder variables use two % characters in the HTML template file (default.tpl), and only a single leading % from inside the .wiki files.

@hq6
Copy link
Contributor

hq6 commented Mar 16, 2019

@HugoNikanor , Since the Placeholders section of doc/vimwiki.txt that this PR touches is providing instructions for the .wiki files, should it have only a leading %?
That is, this section tells the user how to specify placeholders in the wiki file and not in tpl files.

@hq6
Copy link
Contributor

hq6 commented Mar 16, 2019

Sorry I think I just realized why I was confused. If my new understanding is correct, %wiki_path% is only meant to be used in the HTML template files and never in the .wiki files. However, everything else in the Placeholders documentation is referring to directives placed inside wiki files.

Please correct me if my new understanding is wrong.

If I have understood this correctly, I think it would be more clear to document this in the description of vimwiki-option-template_path instead, as a section of "Additional Template Variables", and leave it out of Placeholders. I realize that @EinfachToll asked you to put it in Placeholders, but I hope both of you can understand why this might cause confusion.

@HugoNikanor, what are your thoughts on this?

@HugoNikanor
Copy link
Contributor Author

@hq6. I agree with you on the confusion. I submitted a new commit which moves the documentation.

@hq6 hq6 merged commit 6f687af into vimwiki:dev Mar 18, 2019
hq6 added a commit that referenced this pull request Mar 18, 2019
Introduce a `%wiki_path%` variable which can be used in HTML template
files to output the path of the wiki file being converted to HTML.
@HugoNikanor HugoNikanor deleted the wiki-path branch March 18, 2019 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants