-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
webmention based comments #62
Comments
Have you considered http://webmention.io? Looks like they don't have open signups, yet, but it's open source and you could run it on your server. All you would need then, is a simple grav plugin that runs the JavaScript and through JSONP collect all the pingbacks. Is this what you are trying to do? |
The main reason why I'd want to go with Grav is to have a flat file based system what I can easily backup/archive. Having the comments out of this system does not sound good for me. You're right with the part that this is an easy and quite effortless solution, but I'd really love to actually store the comments somehow. What I was thingking is something like this:
|
It seems to be this could be done with a custom plugin. As you say the underlying architecture of Grav lends itself pretty easy to what you are describing. I definitely feel like this should not be 'part' of the core grav in order to keep that lean, focused, and efficient. But a 3rd party plugin providing this functionality totally makes sense. Is this something you would be interested in developing??? |
Maybe as a JSON file, per page, would be more efficient than a single YAML file per comment? But more importantly, consider having 10 pages with 50 comments (likes / pingbacks / webmentions / comments, etc). With the single file approach it would be 5000 files that you'll have to read and parse constantly. Sure you will have to definitely use cache there, but still it will never be as efficient as having all the data you need in a page, in its own single file. The structure of the JSON could really be stored in different ways, for instance a raw format could be: [
{
"name": "[commenter name]",
"url": "[commenter url]",
"email": "[commenter email]",
"avatar": "[commenter avatar]",
"source": "[pingback/webmention source url]",
"date": "[datetime]",
"lastcheck": "[datetime of last check if it's a webmention and if it's still valid]",
"type": "[comment/like/pingback/etc.]"
},
{
"name": "[commenter name]",
"url": "[commenter url]",
"email": "[commenter email]",
"avatar": "[commenter avatar]",
"source": "[pingback/webmention source url]",
"date": "[datetime]",
"lastcheck": "[datetime of last check if it's a webmention and if it's still valid]",
"type": "[comment/like/pingback/etc.]"
}
] But if you wanted a more structured and organized approach you could go: {
"comments": [
{
"name": "[commenter name]",
"url": "[commenter url]",
"email": "[commenter email]",
"avatar": "[commenter avatar]",
"source": "[pingback/webmention source url]",
"date": "[datetime]",
"lastcheck": "[datetime of last check if it's a webmention and if it's still valid]",
"type": "[comment/like/pingback/etc.]"
},
{
"name": "[commenter name]",
"url": "[commenter url]",
"email": "[commenter email]",
"avatar": "[commenter avatar]",
"source": "[pingback/webmention source url]",
"date": "[datetime]",
"lastcheck": "[datetime of last check if it's a webmention and if it's still valid]",
"type": "[comment/like/pingback/etc.]"
}
],
"likes": [
{
"name": "[commenter name]",
"url": "[commenter url]",
"email": "[commenter email]",
"avatar": "[commenter avatar]",
"source": "[pingback/webmention source url]",
"date": "[datetime]",
"lastcheck": "[datetime of last check if it's a webmention and if it's still valid]",
"type": "[comment/like/pingback/etc.]"
}
],
"pingbacks": [
{
"name": "[commenter name]",
"url": "[commenter url]",
"email": "[commenter email]",
"avatar": "[commenter avatar]",
"source": "[pingback/webmention source url]",
"date": "[datetime]",
"lastcheck": "[datetime of last check if it's a webmention and if it's still valid]",
"type": "[comment/like/pingback/etc.]"
}
]
} Just some thoughts 😃 |
I working to this idea before i trash the project because the online comments system is working fine and i can stay secure i do not lose any comments from various sites. I suggest you to change your idea to have a grav plugin for manage your site comments :) |
hi all,
I was wondering how a webmention based "commenting" system could be implemented in Grav.
So far I was thinking of a directory names comments which would contain 1 comment per 1 file with the same YAML + Markdown setup as the articles.
Any thoughts on this?
The text was updated successfully, but these errors were encountered: