-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Making it easy to add comments #1222
Comments
There is not really such a thing as a unique identifier of a file in git. Doing Alternatively, perhaps you could fabricate unique ids yourself, and store them in the page as metadata tags. Use the following syntax: Note that starting from version |
Thanks a lot for the reply. I had actually thought about the metadata too, but I discarded it as it would be a pain to maintain a manual index for each page. I noticed the upcoming change of metadada format, thanks for the tip and for the release notes. Looking forward to 5.0! I think exposing the SHA1 hash would be quite useful for this purpose. I understand that it's not unique as you are saying, but I think you'd generally not have two pages with the exact same content on a wiki. |
Implemented in #1223, which will be in |
Excellent, thanks! |
Just making a note here so that when v5.0 is released I don't need to look it all up again :) Essentially, we'll be then able to use these variables in the Disqus embed code:
|
It is relatively easy to add Disqus comments to a Gollum wiki by using their universal embed code.
That works fine for the most basic case, but it messes up the commenting system when pages are renamed in Gollum, as there is no way to track a page by a unique identifier. That is, at the time of writing there is no way to specify a meaningful value for these variables in the Disqus JS embed code snippet:
The way I added Disqus comments was to simply add a mustache partial template (
{{>comments}}
) that contains the Disqus embed code, and then modified the stockpage.template
to reference it. Finally, I copied all stock templates plus the newcomments.mustache
and modifiedpage.mustache
ones to a location of my choice and pointed Gollum to it via thetemplate-dir
option (see also issue #1221).Using that method, and unless I'm mistaken, limits me to use only the Ruby variables defined in page.rb in the page.mustache and included partial templates.
Would it be possible to expose a unique page ID and the page URL there? Happy to be pointed to an alternative way to access them, too.
Thanks!
The text was updated successfully, but these errors were encountered: